[Gdal-dev] GTiff / gdal_translate / CMYK - problem
Even Rouault
even.rouault at mines-paris.org
Thu Aug 21 14:44:11 EDT 2008
Maksim,
I've just done a few changes in the GeoTIFF driver to enable basic CMYK
support.
See the log message of http://trac.osgeo.org/gdal/changeset/15178.
And for examples : http://trac.osgeo.org/gdal/changeset/15179.
Regards,
Even
Le Wednesday 20 August 2008 11:46:06 Maksim Sestic, vous avez écrit :
> 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.
>
>
> 2) Photoshopped tiff with CMYK mode set (that's what I need to get):
>
> Driver: GTiff/GeoTIFF
> Files: 080417_75008_000000017_CMYK.tif
> Size is 945, 945
> Coordinate System is `'
> Metadata:
> TIFFTAG_SOFTWARE=Adobe Photoshop CS3 Windows
> TIFFTAG_DATETIME=2008:08:20 02:21:08
> 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=Undefined
> Band 2 Block=945x2 Type=Byte, ColorInterp=Undefined
> Band 3 Block=945x2 Type=Byte, ColorInterp=Undefined
> Band 4 Block=945x2 Type=Byte, ColorInterp=Undefined
>
> Also, there's another Photoshop's TIFF tag, "NativeDigest", which I don't
> really get (it's not recognized by gdalinfo) - here's the xmp output:
> <tiff:NativeDigest
> xmlns:tiff="http://ns.adobe.com/tiff/1.0/">256,257,258,259,262,274,277,284,
>530,531,282,283,296,301,318,319,529,532,306,270,271,272,305,315,33432;46BB97
>3B26CC7DED3A1C59F8F9AC7EC5</tiff:NativeDigest>
>
>
> Regards,
> Maksim Sestic
More information about the gdal-dev
mailing list