At 12:34 PM 4/20/2001 -0700, Paul Rohr wrote:
>Thus, at the time I could run the same XP decoder to emit individual pixels,
>but I needed platform-specific routines to construct the necessary
>uncompressed buffers to bit-blast to the screen.  Running that kind of
>process in reverse to get back to a PNG or JPEG sounds even more obnoxious.
>
>Is this not a problem any more?  It'd be wonderful to hear that things have
>been standardized enough that you could hand the exact same uncompressed
>RGB(A) buffer to drawing routines on most or all of our supported platforms.
         You are correct that Mac, Windows and Unix/X have slightly 
different native representations of how the combination of RGBA pixels are 
stored - but using a single ifdef in a header you have still have 100% XP 
code.  In fact, this is exactly what ImageMagick does.  Here is the 
declaration for a "PixelPacket":

typedef struct _PixelPacket
{
#if defined(WORDS_BIGENDIAN)
   Quantum
     red,
     green,
     blue,
     opacity;
#else
#if defined(macintosh)
   Quantum
     opacity,
     red,
     green,
     blue;
#else
   Quantum
     blue,
     green,
     red,
     opacity;
#endif
#endif
} PixelPacket;


LDR


Reply via email to