SOLVED
The problem is that Pillow does not know the input ICC profile, while photoshop had one set as default.
Photoshop use for
CMYK: U.S. Web Coated (SWOP) v2
RGB: sRGB IEC61966-2.1
So I've solved in this way:
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)
On Windows the profiles can be found (if installed) in these folders:
C:WindowsSystem32spooldriverscolorUSWebCoatedSWOP.icc
C:Program Files (x86)Common FilesAdobeColorProfilesRecommendedUSWebCoatedSWOP.icc
C:Program Files (x86)AdobeAcrobat DCResourceColorProfilesRecommendedUSWebCoatedSWOP.icc
C:WindowsSystem32spooldriverscolorsRGB Color Space Profile.icm
C:Program Files (x86)Common FilesAdobeColorProfilesRecommendedsRGB Color Space Profile.icm
C:Program Files (x86)AdobeAcrobat DCResourceColorProfilesRecommendedsRGB Color Space Profile.icm
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…