[Gdal-dev] Bug in BMP driver?

Frank Warmerdam warmerdam at pobox.com
Tue Nov 4 09:33:47 EST 2003


Winkler, Roland wrote:
> Hi,
> 
> I have problems reading a 32 bit RGB Windows Bitmap (type BMPC_RGB). I 
> changed the ::IReadblock for 32 bit bitmaps and it worked afterwards:
...
> the reason for the -1 in the 32 bit case:
> in 24 bit case for each pixel the array pabyScan looks like [BGR] pImage 
> is assigned [RGB]
> the implementation for 32 implies that the order of pabyScan is [ABGR], 
> but I think it should be [BGRA].
> I'm not quite sure about it, because I have only one 32 bit bitmap and I 
> couldn't produce another example.
> 
> Has anybody else problems with 32 bit ..bmp's, or is my .bmp corrupt?

Roland,

Would it be possible for you to submit the suggested fix along with the sample
bmp demonstrating the problem in Bugzilla?

   http://bugzilla.remotesensing.org/enter_bug.cgi?product=GDAL

Then we can have Andrey verify your fix, and apply it.  I would also like to
add your 32bit BMP file to my test files.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent





More information about the Gdal-dev mailing list