BUG: wrong map colours

Some modules display the map with wrong colours (example: Malta.vmod), that is, don’t show the green component (and giving a purple ugliness on the screen…) and I’m sure that is in the handling of the .jpg image format; I have looked “under the hood” and the extracted map in .jpg shows proper colours in image viewers.

I use a Linux box, CPU AMD64 and 4 GB di ram with a GPU ATI radeon, and I’m confident that the issue is confined to Vassal and/or the java machine (currently, icedTea7 2.3.7) because I noticed it only on Vassal, and I kept java usage to a very bare minimum

HTH, and

Best regards from Italy
Dott. Piergiorgio.

Thus spake “dott.Piergiorgio”:

Some modules display the map with wrong colours (example: Malta.vmod),
that is, don’t show the green component (and giving a purple ugliness on
the screen…) and I’m sure that is in the handling of the .jpg image
format; I have looked “under the hood” and the extracted map in .jpg
shows proper colours in image viewers.

You’ve most likely hit a JPEG loading bug in Java. I’ve come across
several of these already. I’ll see if I can find a workaround.


J.

Thus spake Joel Uckelman:

Thus spake “dott.Piergiorgio”:

Some modules display the map with wrong colours (example: Malta.vmod),
that is, don’t show the green component (and giving a purple ugliness on
the screen…) and I’m sure that is in the handling of the .jpg image
format; I have looked “under the hood” and the extracted map in .jpg
shows proper colours in image viewers.

You’ve most likely hit a JPEG loading bug in Java. I’ve come across
several of these already. I’ll see if I can find a workaround.

It looks like Java ImageIO is incorrectly loading YCbCr pixel data as
RGB. I’m now looking for a way to detect this when it happens.


J.

Can you give me some more examples of JPEGs which have mangled colors?

This problem has been noted as Bug 9882. I believe I’ve found a workaround. Please try 3.2.3-svn8561:
http://www.vassalengine.org/~uckelman/builds/

OK I’ll test it.
Side question, perchance you have seen my post about VASL ? (I have issues with the extentions, namely, what should be installed for correct loading of the SSFs)

On other examples, I don’t remember off my hat what other has the issue; surely one of the Jour de Gloire series; I’ll try to localize these others, then… purging the tile cache :smiley:

Best regards from Italy,
dott. Piergiorgio.

Immediate test report: Malta.vmod’s map now is displayed OK; I have also tried basic manipulations (zooming, scrolling, adding/moving/removing pieces and stacks) w/o issues later I’ll hunt for the other “purple map” .vmods (and test those…)

Best regards from Italy,
dott. Piergiorgio.