Converting from CMYK to RGB with a pad is different than converting from Photoshop

I need to convert an image from CMYK to RGB in python. I used the pillow this way:

img = Image.open('in.jpg') img = img.convert('RGB') img.save('out.jpg') 

The code works, but if I convert the same image to Photoshop, I have a different result, as shown below: -

a

The only operation performed in Photoshop is to change the method from CMYK to RGB. Why is there a difference between two RGB images? Could this be a problem with the color profile?

+5
source share
1 answer

solvable

The problem is that Pillow does not know the input ICC profile, and Photoshop has one set by default.

Using Photoshop for

CMYK : US Web Coated (SWOP) v2

RGB : sRGB IEC61966-2.1

So, I decided like this:

 img = Image.open('in.jpg') img = ImageCms.profileToProfile(img, 'USWebCoatedSWOP.icc', 'sRGB Color Space Profile.icm', renderingIntent=0, outputMode='RGB') img.save('out.jpg', quality=100) 
+6
source

All Articles