SmileyChris / easy-thumbnails

Easy thumbnails for Django
http://easy-thumbnails.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
1.39k stars 319 forks source link

Keep ICC profile when saving image, if present #554

Closed siovene closed 2 months ago

siovene commented 4 years ago

Closes #366

siovene commented 4 years ago

Hi @cogat, thanks for the review! I think I addressed all points. They were very valid and it looks a lot better now :) Can you give it another look, please?

Sorry for the number of commits, I assume there will be a squash & merge at the end.

Thanks!

siovene commented 3 years ago

Just for piece of mind, this PR has been in production on AstroBin for half a year with no problems :)

siovene commented 3 years ago

@SmileyChris any chance this could be reviewed? It's the only thing that keeps me from using the upstream library, and it seems to work fine: it's been in production on AstroBin for half a year, which is a volume of about 50k images. Thanks!

BigglesZX commented 1 year ago

Any chance of getting this merged in?

BigglesZX commented 3 months ago

@SmileyChris @jrief Is it possible this could be reviewed and merged in? I've been using a fork based on this PR for a couple of years in production with no issues.

SmileyChris commented 3 months ago

From my fading memory, here's some context as to why this wasn't merged in earlier.

I believe we did actually keep the icc profile at some stage, but it turned out that some images can have incredibly large ICC profiles attached so this blew the size of the thumbnails out. The easy solution was to remove the profile. If possible, it would be nice to only include the profile if it was smaller than X, assuming finding this out is doable...

SmileyChris commented 3 months ago

Since this is an option which defaults to false however, I can't see any harm in merging it! Maybe the docs could mention the side effect of this producing potentially larger images. A reasonable next step too would be that when this option is false, actually squash the color space before dropping the icc profile...