TIFF conversion RGB->CMYK 'the right way'
Posted: 2009-11-30T02:15:56-07:00
Hi - I have a RGB TIF which I want to convert to use CMYK. Everything appears to work well but the Python Imaging Library (PIL) chokes on the output. Before I dig too far into PIL I'd like to be sure I'm doing the right thing when making the conversion from an ImageMagick point of view.
I do two different steps to convert the TIF from RGB to CMYK. In step1 I provide a CMYK profile to swop for the RGB one. In Step2 I flatten the TIF and then use TIFFSET to explicitly set some headers which are otherwise missing.
What I'd be grateful to know is from an Imagemagick point of view does it seem I'm doing 'the right thing' ? Or is there something obviously wrong which would upset most right thinking TIF readers !
STEP 1 (in windows .BAT form)
==========================
STEP 2
========
I do two different steps to convert the TIF from RGB to CMYK. In step1 I provide a CMYK profile to swop for the RGB one. In Step2 I flatten the TIF and then use TIFFSET to explicitly set some headers which are otherwise missing.
What I'd be grateful to know is from an Imagemagick point of view does it seem I'm doing 'the right thing' ? Or is there something obviously wrong which would upset most right thinking TIF readers !
STEP 1 (in windows .BAT form)
==========================
Code: Select all
@echo off
set ICCCOLPROFDIR=C:\Adobe_ICC_Profiles_bundler
set IMGINPUTDIR=C:\20091130
set IMGOUTPUTDIR=C:\20091130\OutputImages
set CONVERTEXE=C:\ImageMagick\convert.exe
@echo off
REM Convert the TIFF Produced directly from the ZendGraph output
set INPUTFILE=ZENDGraphOutput.TIFF
set OUTPUTFILE=ZENDGraphOutput-Step1.TIF
@echo on
%CONVERTEXE% %IMGINPUTDIR%\%INPUTFILE% +profile icc -profile %ICCCOLPROFDIR%\RGBProfiles\AdobeRGB1998.icc -profile %ICCCOLPROFDIR%\CMYKProfiles\USWebCoatedSWOP.icc -strip %IMGOUTPUTDIR%\%OUTPUTFILE%
@echo off
========
Code: Select all
@echo off
set CONVERTEXE=C:\ImageMagick\convert.exe
set IMGDIR=C:\20091130\OutputImages
set TIFFSETEXE=C:\bin\installed\GnuWin32\bin\tiffset.exe
@echo off
REM Convert the TIFF Produced directly from the ZendGraph output
set INPUTFILE=ZENDGraphOutput-Step1.TIF
set INTERMEDIATEFILE=ZENDGraphOutput-Step2.TIF
@echo on
%CONVERTEXE% %IMGDIR%\%INPUTFILE% -flatten +matte %IMGDIR%\%INTERMEDIATEFILE%
@echo off
%TIFFSETEXE% -s 305 Banana %IMGDIR%\%INTERMEDIATEFILE%
%TIFFSETEXE% -s 296 2 %IMGDIR%\%INTERMEDIATEFILE%
%TIFFSETEXE% -s 282 96 %IMGDIR%\%INTERMEDIATEFILE%
%TIFFSETEXE% -s 283 96 %IMGDIR%\%INTERMEDIATEFILE%
@echo off