Making WordPress.org

Opened 2 months ago

Last modified 2 months ago

#7460 new defect (bug)

Use Imagick/ImageMagick instead of GD for the photo directory

Reported by: desrosj's profile desrosj Owned by:
Milestone: Priority: normal
Component: WordPress.org Site Keywords: pending-systems 2nd-opinion
Cc:

Description

I noticed recently that a photo I submitted to the directory had less vibrant colors than the version I originally uploaded.

I can't say with 100% certainty, but based on the metadata in the generated image files, it seems that w.org is using GD to process images and not Imagick/ImageMagick. For example, looking at the metadata for this image which is generated from the original, there is a comment metadata field with the value of CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 82.

The original image was created using an iPhone and has the Display P3 color profile. In my testing, Imagick/ImageMagick preserves this profile when generating subsizes, thus preserving the original colors. GD however does not and instead assigns an sRGB color profile, causing the image to lose some of it's vibrancy.

The iPhone has used the [DCI-P3 Display P3 profile (one that builds off of DCI-P3) since iPhone 7]. So it's highly likely a high percentage of the images in the photo directory are suffering from a loss of color quality when compared to how the contributor submitted them originally. In general, GD is also known for producing images of lesser quality than ImageMagick and having some odd nuances in handling color profiles.

Would it be possible to use ImageMagick for the Photo Directory to better preserve the original colors in the submitted photos? And if so, would it be possible to regenerate the images uploaded so far in order to correct any loss of color caused to date due to switching color profiles?

Change History (3)

This ticket was mentioned in Slack in #core-media by desrosj. View the logs.


2 months ago

#2 @Otto42
2 months ago

  • Component changed from Photo Directory to WordPress.org Site

I'm changing this to the general category for the WordPress.org site because adding the image magick library would impact all of the WordPress.org sites, not just photos.

#3 @dd32
2 months ago

  • Keywords pending-systems 2nd-opinion added

Raised with systems:
https://make.wordpress.org/systems/2024/02/12/imagemagick-for-photo-directory/

And if so, would it be possible to regenerate the images uploaded so far in order to correct any loss of color caused to date due to switching color profiles?

Potentially; but I don't know how it stores files and/or if that's viable.

@coffee2code would have to weigh in there. (On that Sysreq too if you're against it, etc)

Note: See TracTickets for help on using tickets.