Using wxWidgets 3.1.7, wxImage::LoadFile() fails to load some bitmaps that used to load without any problems under wxWidgets 3.0.4. I am attaching a program and sample images below. The output under wxWidgets 3.0.4 is as follows:
test1.bmp ok
test2.bmp ok
test3.bmp ok
test4.bmp ok
test5.bmp ok
test6.bmp ok
test7.bmp ok
test8.bmp ok
The output under wxWidgets 3.1.7 is as follows:
test1.bmp ok
test2.bmp ok
test3.bmp ok
test4.bmp ok
test5.bmp failed
test6.bmp failed
test7.bmp failed
test8.bmp failed
Environment:
Linux Mint 20
wxWidgets 3.1.7
wxGTK
GTK 3.24.20
Attachments: wxImageLoadTest.zip
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I opened up test5.bmp in 4 different non-wxWidgets apps, and none of them reported a problem. I opened it up with an app built on wxWidgets 3.1.5, and it failed as did another app built on 3.1.7, but an app built on wxWidgets 3.0 (I know for certain it uses wxWidgets to load bitmaps) loaded the bitmap without a problem. This was all done on Windows, so it doesn't appear to be on OS specific issue, or specific to the app adrianlopezroche is using.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
caused by cccda9e but I know nothing about bitmap headers so I can't fix this myself.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Oh, Eric replied in the mailing list as well, but that is not visible here: https://groups.google.com/g/wx-dev/c/oHiaF1YpoVs/m/0rRRrQZLAQAJ
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Thanks for reporting this, it definitely needs to be fixed. In the worst case we can always revert cccda9e (we'd need to revert bcb0d42 and ca065c5 too in this case), but perhaps we could instead just make it conditional on comp != BI_BITFIELDS? As the palette is not used in this case, it shouldn't be necessary to do this SeekI(), should it? Eric, what do you think?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Please test the linked PR #22504 if you can, it fixes the issue with reading BI_BITFIELDS bitmaps, but also changes quite a few things, so please let me know if anybody sees any new regressions with it. TIA!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
PR #22504 fixes the problem for me.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Closed #22499 as completed via 3ffc739.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()