Prerequisites
ImageSharp version
4.1.2
Other ImageSharp packages and versions
- SixLabors.ImageSharp.Drawing 3.1.0 - SixLabors.ImageSharp.Web 4.0.1
Environment (Operating system, version and so on)
Windows 11
.NET Framework version
.NET 10.0
Description
When loading a TIFF image with an embedded CMYK ICC profile using ColorProfileHandling.Preserve, the colors are rendered incorrectly and do not match the original image. The preserved version shows noticeably different colors compared to the original, while the converted version appears to produce more accurate results.
This suggests an issue with how ImageSharp handles CMYK ICC profile preservation when converting to the display color space (sRGB). The color transformation is not producing the expected visual output that matches the original image.
Steps to Reproduce
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Formats;
const string inputPath = "cmyk_image.tiff";
using (Image image = Image.Load(
new DecoderOptions
{
ColorProfileHandling = ColorProfileHandling.Preserve
},
inputPath))
{
image.Save("cmyk_image.preserve.tiff");
}
using (Image image = Image.Load(
new DecoderOptions
{
ColorProfileHandling = ColorProfileHandling.Convert
},
inputPath))
{
image.Save("cmyk_image.converted.tiff");
}
Open these files in the same color-managed image viewer:
◦ cmyk_image.tiff
◦ cmyk_image.preserve.tiff
◦ cmyk_image.converted.tiff
4.Compare both generated images with the original. Iv'e also add the images produce by the code
Expected result: Both generated images should visually match the original CMYK TIFF.
Actual result: Both generated images have noticeable color differences. The output created with Preserve differs the most from the original.
Images
cmyk_image.preserve.tiff
cmyk_image.preserve.tiff
cmyk_image.tiff
cmyk_image.tiff
cmyk_image.converted.tiff
cmyk_image.converted.tiff
Prerequisites
DEBUGandRELEASEmodeImageSharp version
4.1.2
Other ImageSharp packages and versions
Environment (Operating system, version and so on)
Windows 11
.NET Framework version
.NET 10.0
Description
When loading a TIFF image with an embedded CMYK ICC profile using
ColorProfileHandling.Preserve, the colors are rendered incorrectly and do not match the original image. The preserved version shows noticeably different colors compared to the original, while the converted version appears to produce more accurate results.This suggests an issue with how ImageSharp handles CMYK ICC profile preservation when converting to the display color space (sRGB). The color transformation is not producing the expected visual output that matches the original image.
Steps to Reproduce
Open these files in the same color-managed image viewer:
◦ cmyk_image.tiff
◦ cmyk_image.preserve.tiff
◦ cmyk_image.converted.tiff
4.Compare both generated images with the original. Iv'e also add the images produce by the code
Expected result: Both generated images should visually match the original CMYK TIFF.
Actual result: Both generated images have noticeable color differences. The output created with Preserve differs the most from the original.
Images
cmyk_image.preserve.tiff
cmyk_image.preserve.tiff
cmyk_image.tiff
cmyk_image.tiff
cmyk_image.converted.tiff
cmyk_image.converted.tiff