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

[Bug] Some parts of legacy 2D panels not rendering correctly #1042

Open
hotdamndel opened this issue May 25, 2024 · 1 comment
Open

[Bug] Some parts of legacy 2D panels not rendering correctly #1042

hotdamndel opened this issue May 25, 2024 · 1 comment

Comments

@hotdamndel
Copy link

First, an odd blank white image which appears rarely with some trains. Train is 10-300 series from https://1drv.ms/u/s!AhCaPh_sbBw9fpYdBQthA4_S39w
panel1

In some panels, big images just don't render at all (try 415 series from Rock_on's BVE5 JNR pack for example) or when # is missing in Color in a Needle indicator in Panel2.cfg (as per BVE5 standard), arrows become blue.

@leezer3
Copy link
Owner

leezer3 commented May 25, 2024

Now, that's really interesting.

Our offending file is an 8-bit palletised BMPv2, with a declared total of 252 colors.
Looking into the color table, the off-white pixels we're seeing are using the color with the index of 253, which is outside of our color table.

If we open this file with Paint or anything using the GDI+ decoder, we get the black background.
However, opening this file with GIMP2, Photoshop or a bunch of other non GDI+ decoders gives a white background.

Basically, mapping to a color outside of the color table is undefined behaviour on behalf of whatever created the file in the first place. For the next build, I'm mapping to black if hacks are enabled.

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

No branches or pull requests

2 participants