Lektor thumbnail: set colorspace in imagemagick
See original GitHub issuePeople tend to feed lektor any JPG files - also with e.g. Photoshop-CMYK-JPGs.
But JPGs with uncommon colorspaces tend to compress very badly and so on.
For me, it resulted in JPG files wtith a few MB filesize on the website.
I propose to add -colorspace sRGB
(it’s the most common in the web) in every imagemagick operation.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (9 by maintainers)
Top Results From Across the Web
Developers - Lektor thumbnail: set colorspace in imagemagick -
Lektor thumbnail : set colorspace in imagemagick. ... People tend to feed lektor any JPG files - also with e.g. Photoshop-CMYK-JPGs.
Read more >Accurate Color Management - ImageMagick
ImageMagick assumes linear color if the color space is RGB instead of sRGB. You can also override the default color space assumptions with...
Read more >lektor/CHANGES.md at master - GitHub
The lektor static file content management system. Contribute to lektor/lektor development by ... Set colorspace to sRGB for thumbnails.
Read more >Untitled
Google play books app upload, Gobo new york ny, China executive director imf, ... Ciash of cians 6, Cuota media general de ganancia,...
Read more >fvk - ALBA.Net
Dogecoindark twitter, Pratighatana movie 1986, Define sound in hindi, Card one banking ... Acc all conference basketball 2013, Color space raw images, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I personally lean towards the initial suggestion: hardcode it for any thumbnail operation. Given that browsers have to do the conversion anyway, and a thumbnail ready for print doesn’t make sense, I don’t even see a point in making it a default and giving control to the users. (… it may be a good idea for some future-planned operations, like simple conversion, but not for thumbnailing).
The one question that needs answering is if it’s the right / safe thing to do in all cases. A short and inconclusive test shows that imagemagick doesn’t touch grayscale images, despite the
-colorspace sRGB
, and in all other cases… everything uses sRGB, correct?P.S.: I’d even go so far to make
-strip
default, or at least+profile '*'
(as strip clears both profiles and comments). I’ve read someplace that browsers assume sRGB if they don’t find an embedded profile, but this should be investigated.Changed in https://github.com/lektor/lektor/pull/694