You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Uploaded images lose their color profile and look washed out on a Mac #806
Uploading an image (for example, a screenshot) on a Mac with the "Color LCD" (Display P3) color profile gives back an image without a color profile, so its colors look washed out.
For example, red rgb(255, 0, 0) (top bar) comes back as rgb(235, 50, 35), and green rgb(0, 255, 0) comes back as rgb(118, 251, 76).
Served (top) and original (bottom).
Suspected reason: CreateCommitImageFiles re-encodes images with GD, which drops the ICC profile. The pixel values stay in Display P3, but browsers read them as sRGB.
Looking into a possible fix, might come with a PR later.
It keeps the existing GD re-encode (so all other metadata is still stripped), validates the upload's ICC profile as a plausible display profile, and muxes it into the stored WebP as a VP8X ICCP chunk, for JPEG, PNG, and WebP uploads alike.
Verified end to end on macOS: a Display P3-tagged upload comes back with sips reporting profile: Display P3 on the stored WebP, and ColorSync renders it to the same sRGB colors as the original (within 1 per channel), where the profile-dropped version renders the raw untagged values. The PR includes a browser screenshot of the three renderings side by side.
@anttikissa you mentioned you might be looking into a fix too — happy to close mine in favor of yours if you have one in flight.
No PR from me for now - I tried to use libvips instead of GD, but that came with tons of caveats: it needs FFI enabled globally, and it would crash the server unless libvips was preloaded. So go ahead with yours 👍
The work is here in case someone wants to take a look #828
Activity
eas4ai commentedon Oct 20, 2026
Opened a draft PR for this: #815
It keeps the existing GD re-encode (so all other metadata is still stripped), validates the upload's ICC profile as a plausible display profile, and muxes it into the stored WebP as a VP8X
ICCPchunk, for JPEG, PNG, and WebP uploads alike.Verified end to end on macOS: a Display P3-tagged upload comes back with
sipsreportingprofile: Display P3on the stored WebP, and ColorSync renders it to the same sRGB colors as the original (within 1 per channel), where the profile-dropped version renders the raw untagged values. The PR includes a browser screenshot of the three renderings side by side.@anttikissa you mentioned you might be looking into a fix too — happy to close mine in favor of yours if you have one in flight.
anttikissa commentedon Oct 20, 2026
No PR from me for now - I tried to use libvips instead of GD, but that came with tons of caveats: it needs FFI enabled globally, and it would crash the server unless libvips was preloaded. So go ahead with yours 👍
The work is here in case someone wants to take a look #828