openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openexr-devel] "Half" support in C?


From: Florian Kainz
Subject: Re: [Openexr-devel] "Half" support in C?
Date: Wed, 02 Mar 2005 12:01:12 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030314

Drew Hess wrote:
It wouldn't be hard to wrap the Half class with C functions.  You'd
still need a C++ compiler to build the wrapper, but then you could use
half from pure C code.

Volunteers welcome :)

d


We already have a few C-callable wrappers; they are in ImfCRgbaFile.h:


typedef unsigned short ImfHalf;

void    ImfFloatToHalf (float f,
                        ImfHalf *h);

void    ImfFloatToHalfArray (int n,
                             const float f[/*n*/],
                             ImfHalf h[/*n*/]);

float   ImfHalfToFloat (ImfHalf h);

void    ImfHalfToFloatArray (int n,
                             const ImfHalf h[/*n*/],
                             float f[/*n*/]);







reply via email to

[Prev in Thread] Current Thread [Next in Thread]