Am 11.06.2011 19:35, schrieb Albrecht Dreß: > Am 07.06.11 21:11 schrieb(en) Oliver Eichler: >> Am 07.06.2011 20:55, schrieb Albrecht Dreß: >>> There is only one little problem - in my big endian boxes, >>> gdal_translate downloads proper images e.g. for the Bavarian server, >>> but when I open the xml with file->open, the colours are shifted. >>> Probably an endianess issue - before digging through the sources: >>> Oliver, where is the input processed, so I can try to fix this? >> >> Imho this is less an endian problem more a version problem between >> GDAL 1.6.x. and 1.7.x The have changed the enumeration for colors. But >> have a look on your own: > > It actually *is* an endianess problem - I saw the issue on OS X Intel > (works) vs. PPC (doesn't, same on Linux/PPC), and all use the same gdal > version (1.8.0).
Ah, ok, I thought you are using an old version for the big endian machine. > > I think your code basically assumes that the 4-byte RGBA value > (uint32_t) has a certain byte order when the four uint8_t band values > are written directly to the memory region (the offsets aren't documented > by Qt, btw.). Apparently, the underlying Qt code interprets them as > uint32_t, though, which explains the observation. Ok, always thought this is byte oriented stuff. Failed in all my assumptions, eh? :) > > The attached trivial fix solves the WMS issue for me, no idea if it has > other harmful effects. The *really* clean (but *really* slow) way is > probably to read all four bands and to construct qrgba() pixels. > Right, I always have a bad feeling when accessing the bitmap buffer this way. But it's the only fast way. I multiplied the patch for the other raster image objects and have committed it to svn. Oliver ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ Qlandkartegt-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users
