[gdal-dev] When use GDALInfo.exe to open a large size BMP file, Error 4 comes

Even Rouault even.rouault at spatialys.com
Wed Jan 31 03:42:10 PST 2024


Hi,

nothing suspicious from a quick look, but I must confess I'm not 
BMP-header-decoding-from-hex-string fluent, so I might have missed 
something. It would help if you could extract the first kilobyte of the 
file and attach it

Even

Le 31/01/2024 à 12:28, zrh via gdal-dev a écrit :
> Hi, everyone,
>
> I have 2 BMP files, huge size:
>
> The first one:
>
> E:\w8.bmp,   size=12,884,901,942 bytes
>
> the file header:
> 42 4D 00 00 00 00 00 00 00 00 36 00 00 00 28 00 00 00 00 00 01 00 00 00 01 00 01 00 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>
> The second one:
>
> E:\w9.bmp, size=51,438,944,310 bytes
>
> the file header:
> 42 4D 00 00 00 00 00 00 00 00 36 00 00 00 28 00 00 00 00 FF 01 00 00 00 02 00 01 00 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>
> My problem is:
>
> When I run Gdalinfo.exe:
>
>
> C:\OSGeo4W\bin>gdalinfo E:\w8.bmp
> ERROR 4: `E:\w8.bmp' not recognized as a supported file format.
> gdalinfo failed - unable to open 'E:\w8.bmp'.
>
> But E:\w9.bmp is OK.
>
> Why? Please help!
>
> Best regards,
>
>
>
> --------------
>
>
>
> zrh
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
http://www.spatialys.com
My software is free, but my time generally not.



More information about the gdal-dev mailing list