[Gdal-dev] GTiff / gdal_translate / CMYK - problem
Frank Warmerdam
warmerdam at pobox.com
Wed Aug 20 11:49:53 EDT 2008
Maksim Sestic wrote:
> Hi all,
>
> I'm having troubles with gdal_translate while creating uncompressed 3-band
> GTiff with CMYK photometric representation. Well, at least CMYK
> representation recognized by Photoshop, which is
> PhotometricInterpretation=5. If I use recommended gdal_translate -co
> 'PHOTOMETRIC=CMYK' switch I keep getting "grayscale" (!) result, again,
> that's what Photoshop says (PhotometricInterpretation=1).
>
> What other -co parameters should I set to make it work? I'm using
> gdal_translate from FWTools 2.2.3
>
>
> Here's the gdalinfo reports:
>
> 1) For RGB raster parsed with gdal_translate -co 'PHOTOMETRIC=CMYK'
> switch:
>
> Size is 945, 945
> Coordinate System is `'
> Metadata:
> AREA_OR_POINT=Area
> TIFFTAG_SOFTWARE=MyApp
> TIFFTAG_DATETIME=20.08.2008 02:51:37
> TIFFTAG_XRESOLUTION=240
> TIFFTAG_YRESOLUTION=240
> TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
> Image Structure Metadata:
> INTERLEAVE=PIXEL
> Corner Coordinates:
> Upper Left ( 0.0, 0.0)
> Lower Left ( 0.0, 945.0)
> Upper Right ( 945.0, 0.0)
> Lower Right ( 945.0, 945.0)
> Center ( 472.5, 472.5)
> Band 1 Block=945x2 Type=Byte, ColorInterp=Gray
> Band 2 Block=945x2 Type=Byte, ColorInterp=Undefined
> Band 3 Block=945x2 Type=Byte, ColorInterp=Undefined
>
> Side note: I also tried using -co 'PHOTOMETRIC=YCBCR' and
> 'PHOTOMETRIC=CIELAB'switches but then gdal_translate crashes.
Maksim,
I would note that CMYK photometric interpretation requires 4 bands.
Furthermore, GDAL does *not* manage the conversion to CMYK color space.
You would need to do that ahead of time by some means.
I've never tried to create CMYK files so I don't have any further advice.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the gdal-dev
mailing list