Some JPEG images embed an sRGB ICC profile, which we remove by converting it to sRGB, resulting in unnecessary quality loss.
https://github.com/philomena-dev/philomena/blob/b7a95ee070036b5be3bd5f5ba5ee26b58c04aadb/lib/philomena_media/processors/jpeg.ex
There's no nice way to determine if two profiles are effectively the same.
Idea: extract the profile and process a sample image with it to see if it matches our reference sRGB or If the target image needs to be processed further.
Simpler idea: skip re-encoding for all profiles with "sRGB" in the name.
Some JPEG images embed an sRGB ICC profile, which we remove by converting it to sRGB, resulting in unnecessary quality loss.
https://github.com/philomena-dev/philomena/blob/b7a95ee070036b5be3bd5f5ba5ee26b58c04aadb/lib/philomena_media/processors/jpeg.ex
There's no nice way to determine if two profiles are effectively the same.
Idea: extract the profile and process a sample image with it to see if it matches our reference sRGB or If the target image needs to be processed further.
Simpler idea: skip re-encoding for all profiles with "sRGB" in the name.