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

Clarify biSizeImage for BI_RLE8 or BI_RLE4 bitmaps #5265

Open
peteroupc opened this issue Jan 12, 2025 · 4 comments
Open

Clarify biSizeImage for BI_RLE8 or BI_RLE4 bitmaps #5265

peteroupc opened this issue Jan 12, 2025 · 4 comments
Assignees
Labels

Comments

@peteroupc
Copy link

peteroupc commented Jan 12, 2025

Type of issue

Missing information

Feedback

Clarify the meaning of biSizeImage of BITMAPINFOHEADER (and the like member of BITMAPV4HEADER and BITMAPINFOV5HEADER) when biCompression (or the like member) is BI_RLE8 or BI_RLE4. Is the value equal to the size of the compressed image data in bytes? The uncompressed image data? Either? What if biSizeImage is larger than the data available in the image file?

@stevewhims
Copy link
Member

Hi, @peteroupc,

Please see the deprecation notice at the top of BITMAPINFOHEADER, with the recommendation to move to Media Foundation, etc.. In any case, Media Foundation has the MFCalculateBitmapImageSize function, which might help you with this question.

-Steve

@peteroupc
Copy link
Author

peteroupc commented Jan 22, 2025

Hi, @peteroupc,

Please see the deprecation notice at the top of BITMAPINFOHEADER, with the recommendation to move to Media Foundation, etc.. In any case, Media Foundation has the MFCalculateBitmapImageSize function, which might help you with this question.

-Steve

My question doesn't relate to Windows Media Foundation. Nor does it relate only to BITMAPINFOHEADER, which is not used only in Windows Media Foundation or in video encoding.

Rather, it relates to the use of BITMAPINFOHEADER (and BITMAPV4HEADER and BITMAPV5HEADER) in the Windows GDI, specifically in Windows device-independent bitmaps, where these three structures are not obsolete and are alive and well. The answer I seek here will be helpful when interpreting images in the .bmp format.

@stevewhims stevewhims reopened this Jan 22, 2025
@stevewhims
Copy link
Member

Hi, @peteroupc,

I'll consult the product team for help with your questions, and I'll try and find out why the docs for BITMAPINFOHEADER say that the feature associated with it is obsolete. The implication being that BITMAPINFOHEADER is obsolete.

-Steve

@stevewhims
Copy link
Member

This is the same response for issues 5241 and 5265.

It sounds like you want to retrieve information about a bitmap. Parsing a bitmap that way in your own code is extremely complicated and error-prone, and we don’t recommend it.

If you could describe exactly what it is you want to do, then perhaps there are other ways we can help.

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

No branches or pull requests

2 participants