[GRASS-dev] cause for bad colors in output from png driver - SOLVED!

Michael Barton michael.barton at asu.edu
Wed May 9 19:29:10 EDT 2007


Glynn,

Just compiled the newest version from the CVS and this is solved. Thanks
very much for responding so quickly.

Michael


On 5/9/07 2:33 PM, "Glynn Clements" <glynn at gclements.plus.com> wrote:

> Duh; this is related to the changes to support mmap()d files.
> 
> The framebuffer is always stored as B,G,R,A (the format used by 32-bpp
> BMP files). This corresponds to 0xAARRGGBB on a little-endian system
> and 0xBBGGRRAA on a big-endian system (e.g. Mac).
> 
> Externally (DRV_color, DRV_lookup_color), the alpha value is always
> zero (0 = opaque, 255 = transparent), resulting in 0x00RRGGBB on x86
> and 0xBBGGRR00 on Mac. But the valid range of colors is always 0 to
> 0x00FFFFFF inclusive.
> 
> Hence the error on Mac, and why I couldn't reproduce it on x86.
> 
> I'll change it to always use 0x00RRGGBB externally.
> 

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton 




More information about the grass-dev mailing list