Profilo colore incorporato nell'immagine

Non sono sicuro se questo sia giĂ  apparso altrove (i termini di ricerca, profilo colore incorporato, restituiscono risultati non correlati.. :slight_smile: ).

Gestisco un forum di fotografia su software libero su discuss.pixls.us. Come puoi immaginare, abbiamo utenti molto esigenti su come vengono visualizzate le loro immagini.

Recentemente abbiamo riscontrato un problema in una discussione sulla gestione del colore:

Uno dei fotografi ha notato che la funzionalità di recupero delle immagini collegate e il loro salvataggio locale sembra rimuovere le informazioni sul colore dalle immagini. Sebbene questo possa andare bene per risparmiare spazio nella maggior parte dei forum, per un forum di fotografia è piuttosto doloroso. :frowning:

Per illustrare, questa immagine ha un profilo colore incorporato ruotato. Dovrebbe mostrare (Rot = Rosso, GrĂĽn = Verde, Blau = Blu):


L’immagine sorgente che ho incorporato nel post sopra si trova qui:

https://houz.org/tmp/farbkreis.jpg

Ecco la stessa immagine, caricata direttamente sul forum:

Il processo di elaborazione delle immagini viene effettuato con ImageMagick? In tal caso, è stato considerato l’aggiunta di un’opzione per convertire le immagini caricate in sRGB e contrassegnarle come tali prima del salvataggio?

(Sarei felice di indagare ulteriormente se qualcuno potesse indicarmi le parti di codice pertinenti che gestiscono la conversione delle immagini al momento del caricamento?)

5 Mi Piace

Sure check with @zogstrip.

@zogstrip - is the conversion being done using imagemagick? If so, would you mind pointing me to the relevant section?

It appears that we may only need an option to convert any images to sRGB if they have a different profile embedded, and then either strip the profile or specify that the image is now sRGB.

We do the resizing with convert but then the thumbnail is optimised using optipng.

You will find everything you need to know in OptimizedImage and more specifically

3 Mi Piace

Tested fix:

https://github.com/discourse/discourse/pull/4064

3 Mi Piace

This still does not look fixed to me… I just tried with the image on the OP.

@tgxworld as part of your image magick 7 upgrade can you test this?

3 Mi Piace

This is actually a result of ImageOptim and not ImageMagick. We probably don’t want to be stripping the ICC profile here?

  • :strip — List of extra markers to strip: :comments , :exif , :iptc , :icc or :all (defaults to :all )
3 Mi Piace

Probably :comments is what we want there?

1 Mi Piace

I was thinking about this and this seems very specific to a photography forum. If they want to keep all the metadata/color profile, they can just set SiteSetting.strip_image_metadata to false. For majority of the images, keeping the exif or iptc metadata isn’t going to be very useful.

2 Mi Piace

Interesting @Patrick_David, so this is not really a bug… it is a feature request to allow for fidelity when stripping exif tags (or simply misunderstanding an existing feature)

I am going to close this for now, but feel free to open a new topic if you find setting strip_image_metadata to false unacceptable.

5 Mi Piace