[Solved] Wrong colors in image - CMYK/ICC

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, helmut, xnview

Post Reply
User avatar
lian
Posts: 226
Joined: Wed Nov 24, 2004 8:53 pm
Contact:

[Solved] Wrong colors in image - CMYK/ICC

Post by lian »

Hello, I don’t get the good colors in particular file when resizing with NConvert. No problem with XnViewMP or XnConvert - à droite les bonnes couleurs.
xnconvert.png
Fichier original https://framadrop.org/r/6skE8vWJpD#AMt6 ... LLrrjG/CU=
Last edited by lian on Thu Apr 27, 2017 7:26 am, edited 1 time in total.
SF, illustrations et mes BD sur mon blog: https://www.li-an.fr/
Windows 10 Home 64 bits
cday
XnThusiast
Posts: 3973
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: not the right colors

Post by cday »

Your image is CMYK, are you including theses switches in your code?

Code: Select all

-ctype cmyk 	  : Channel Type (Raw)

-cmyk_space		: Convert if possible in CMYK space
I haven't actually worked with CMYK files myself so you may need to experiment a bit, and I'm not sure whether -ctype is only relevant to Raw files.

(Edited).
User avatar
lian
Posts: 226
Joined: Wed Nov 24, 2004 8:53 pm
Contact:

Re: not the right colors

Post by lian »

Thanks for quick answer. I will take a look.
SF, illustrations et mes BD sur mon blog: https://www.li-an.fr/
Windows 10 Home 64 bits
User avatar
lian
Posts: 226
Joined: Wed Nov 24, 2004 8:53 pm
Contact:

Re: not the right colors

Post by lian »

Thanks again. I had to add to get the exact colors and keep ICC profile

Code: Select all

-keep_icc -icc
SF, illustrations et mes BD sur mon blog: https://www.li-an.fr/
Windows 10 Home 64 bits
cday
XnThusiast
Posts: 3973
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: not the right colors

Post by cday »

lian wrote:I had to add to get the exact colors and keep ICC profile:

Code: Select all

-keep_icc -icc
In addition to using one of the CMYK switches, or was it not necessary to include either?

Could you post an example command line that works, which might help someone else in the future?
User avatar
lian
Posts: 226
Joined: Wed Nov 24, 2004 8:53 pm
Contact:

Re: [Solved] Wrong colors in image - CMYK/ICC

Post by lian »

I use to resize to 1200 px the longest size:

Code: Select all

-ctype cmyk -cmyk_space -keep_icc -icc -ratio -rtype lanczos -rflag orient -quiet -resize longest 1200 -out jpeg -o
SF, illustrations et mes BD sur mon blog: https://www.li-an.fr/
Windows 10 Home 64 bits
cday
XnThusiast
Posts: 3973
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: [Solved] Wrong colors in image - CMYK/ICC

Post by cday »

Thank you for posting your example. :D

I wonder if the -ctype cmyk : Channel Type (Raw) switch is needed for a JPEG input, but it works anyway... :?: :D
Post Reply