[Gdal-dev] Bug fix in BMP support

Ben Discoe ben at vterrain.org
Tue Jun 17 17:11:23 EDT 2003

I made another fix to the BMP reader.  It was trying to compensate for
the BGR / RGB issue, but not doing it quite right.  It was also trying
to count backwards from the end of the file by size, which can be a
couple byte away from correct for some files.  Fixed module attached.


> -----Original Message-----
> From: Ben Discoe
> Sent: Tuesday, June 17, 2003 7:43 AM
> This fixes a crash in the BMP reader on Windows:
> RCS file: /cvsroot/osrs/gdal/frmts/bmp/bmpdataset.cpp,v
> retrieving revision 1.20
> diff -w -b -r1.20 bmpdataset.cpp
> 932c932
> <     VSIFCloseL( poOpenInfo->fp );
> ---
> >     VSIFClose( poOpenInfo->fp );
> VSIFClose must be used here, because VSIFOpen was used in GDALOpenInfo
> (core/gdalopen.cpp) to open the file.
> -Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bmpdataset.cpp
Type: application/octet-stream
Size: 49869 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20030617/5402b280/bmpdataset.obj

More information about the Gdal-dev mailing list