serenity icon indicating copy to clipboard operation
serenity copied to clipboard

LibGfx/JPEG: Teach JPEGLoader how to be patient with non-compliant images [1/N]

Open LucasChollet opened this issue 2 years ago • 2 comments

Fix this image:

0x00-to-0xFF-between-segments

LucasChollet avatar Jun 23 '23 03:06 LucasChollet

Are there images like this in the wild?

libjpeg-turbo seems to not be able to decode this.

nico avatar Jun 23 '23 03:06 nico

libjpeg-turbo seems to not be able to decode this.

libjpeg (or whatever the default image reader on gnome uses) does

Are there images like this in the wild?

Is this wild enough? https://github.com/haraldk/TwelveMonkeys/blob/master/imageio/imageio-jpeg/src/test/resources/jpeg/0x00-to-0xFF-between-segments.jpg

No external images are linked by the original author, and the image I added in the description looks very generated on purpose.

LucasChollet avatar Jun 23 '23 03:06 LucasChollet

Is this wild enough? https://github.com/haraldk/TwelveMonkeys/blob/master/imageio/imageio-jpeg/src/test/resources/jpeg/0x00-to-0xFF-between-segments.jpg

It's a broken image from a jpeg test suite. That doesn't seem terribly in-the-wild to me.

FWIW, Safari and Chrome/Mac can't display that image either.

nico avatar Jun 25 '23 18:06 nico

I made this patch because I assumed that an external image made the author of TwelveMonkeys create the test case.

But I agree, if that's not the case, the interest is quite limited

LucasChollet avatar Jun 25 '23 19:06 LucasChollet

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!

stale[bot] avatar Jul 16 '23 20:07 stale[bot]

This pull request has been closed because it has not had recent activity. Feel free to re-open if you wish to still contribute these changes. Thank you for your contributions!

stale[bot] avatar Jul 23 '23 21:07 stale[bot]