Am 12.06.2011 10:43, schrieb Albrecht Dreß: > Am 11.06.11 19:53 schrieb(en) Oliver Eichler: >>> 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. > > To make things more robust, we could actually /calculate/ the real > offset from a sample pixel. This fixes the endianess issue and would > make the code immune against any changes within Qt and/or GDAL (see > attached patch). The extra overhead should be negligible. > > More nitpicking: drop the assumption that a QRgb is 4 bytes, but use > sizeof(), just if any compiler thinks an 'unsigned int' should be 64 > bits... > > Best, Albrecht.
What a cunning patch :) I multiplied it for the other raster map classes, too. It's in SVN. BTW, I would send a compiler to /dev/null if it make int more than 32 bit. 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
