Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BMP: fix reading images larger than 4GB #9168

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

rouault
Copy link
Member

@rouault rouault commented Jan 31, 2024

This fixes a regression introduced in GDAL 3.4.0 per #4720

This fixes a regression introduced in GDAL 3.4.0 per OSGeo#4720
@coveralls
Copy link
Collaborator

Coverage Status

coverage: 68.811% (+0.006%) from 68.805%
when pulling a998ec5 on rouault:bmp_more_than_4GB
into 5d6bbd0 on OSGeo:master.

@rouault rouault merged commit cead2b8 into OSGeo:master Feb 1, 2024
33 checks passed
@jratike80
Copy link
Collaborator

I thought that BMP cannot be larger that 4 GB https://www.artwork.com/gerber/vlbv/faq/bmp_header.htm but obviously it can. Is the specification changed at some time?

@rouault
Copy link
Member Author

rouault commented Feb 1, 2024

but obviously it can

I don't know if the spec allows it but GDAL has never limited it. But I would assume most BMP viewer will struggle with such large files. GDAL writes a dummy 0xFFFFFFF value in the header field where the file size is written, and on reading it ignores it. Cf c2b55fe for a related past changes (but writing and reading files larger than 4 GB was older than this one)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants