Perfil de color incrustado en la imagen

No estoy seguro de si esto apareció en otro lugar (los términos de búsqueda, perfil de color incrustado, devuelven resultados no asociados.. :).)

Dirijo un foro de fotografía de Software Libre en discuss.pixls.us. Como pueden imaginar, tenemos usuarios muy exigentes sobre cómo se muestran sus imágenes.

Recientemente nos encontramos con un problema en un hilo sobre gestión del color:

Uno de los fotógrafos notó que la funcionalidad de obtener imágenes enlazadas y almacenarlas localmente parece eliminar la información de color de las imágenes. Aunque esto puede ser aceptable para ahorrar espacio en la mayoría de los foros, para un foro de fotografía es bastante molesto. :frowning:

Para ilustrarlo, esta imagen tiene un perfil de color incrustado rotado. Debería mostrar (Rot = Rojo, Grün = Verde, Blau = Azul):


La imagen original que incrusté en el mensaje anterior se puede encontrar aquí:

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

Aquí está la misma imagen, subida directamente al foro:

¿Se está realizando el procesamiento de imágenes con ImageMagick? De ser así, ¿se ha considerado la posibilidad de añadir una opción para convertir las imágenes subidas a sRGB y etiquetarlas como tal antes de guardarlas?

(Estaría encantado de investigar más a fondo si alguien pudiera indicarme las partes relevantes del código que gestionan la conversión de imágenes al subirlas).

5 Me gusta

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 Me gusta

Tested fix:

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

3 Me gusta

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 Me gusta

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 Me gusta

Probably :comments is what we want there?

1 me gusta

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 Me gusta

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 Me gusta