Serenity: Most jpg files don't open

Created on 10 Nov 2020  路  6Comments  路  Source: SerenityOS/serenity

I have got a few jpg files to load and display under serenity but the majority, about 90% of the jpeg files I have tried do not display as thumbnails in the file manager and nor do they display under QuickShow when I double click on them.

I have attached a couple of jpg's sourced from from a SM site you may have heard of that current don't open under Serenity:

124687763_2704432306464485_4772906715501244690_n
115850077_2607213792853004_6744027362703265399_n

All 6 comments

The two JPEGs above seem to have SOF2 frames, which means they are progressively encoded. As of now the JPEG decoder cannot decode progressive JPEGs.

about 90% of the jpeg files I have tried do not display as thumbnails in the file manager and nor do they display under QuickShow

Have you been trying JPEGs from the same source? From what I know majority of images on the web are baseline JPEGs. This is one of the wallpaper sites that the Serenity browser can render and most JPEGs seem to load fine here: https://wallpaperscraft.com/

Thanks for explaining that @devsh0 . Did you write Serenity's jpg support? Do you plan to add prog jpg support?

Yes :)

Progressive JPEGs are tricky. There are multiple scans that incrementally refine the rendered image. I started working on it but lost motivation at some point. Also if I remember correctly, implementing progressive decoding would make the JPGLoader slightly incompatible with the Image decoder plugin, the generic interface that applications use to decode images. If you want, feel free to add progressive JPEG support.

I'm barely a beginner at programming and this is way over my head.

I'm still curious about how complete your progressive jpg code is? The image decoder plugin will have to be updated to accomodate progressive jpegs as its not a format that can be ignored in a desktop OS or browser.

Yes, eventually something has to be done about progressive JPEGs. I think we can make it work without tweaking the image decoder plugin if we finish all the scans before announcing "success" to the plugin, at which point it can proceed as if the image was a baseline JPEG. Earlier versions of internet explorer did exactly that. Of course, we then lose all the "benefits" of progressive rendering but I believe that's okay. There isn't much to gain by rendering images progressively.

That said, I don't think support for progressive JPEGs is an immediate requirement to the system. The only place where we should expect to see a lot of images is the browser and at this point, if you decide to browse the web seriously on Serenity Browser, unsupported progressive JPEGs will be the least of your annoyances ;-).

The progressive rendering was handy when I was on dialup 25 years ago but its not quite as essential when 100Mb connections are common. It would be nice to have but if you can get the prog jpgs to to display without the prog rendering that'd be a hack of legend sir!

We need to get @awesomekling running serenity full time ASAP and that's not gonna happen if he can't view his all-important meme stash.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

howar6hill picture howar6hill  路  3Comments

bgianfo picture bgianfo  路  6Comments

BenWiederhake picture BenWiederhake  路  8Comments

MWGuy picture MWGuy  路  4Comments

Arthur-Kamau picture Arthur-Kamau  路  7Comments