[gdal-dev] gdal_translate crop tiff (cmyk)

Paulo Pires paulopires16 at gmail.com
Sat Feb 13 03:59:43 PST 2016


Hello

I use the command *gdal_translate *with *-projwin* option to crop a tiff
image but I lose the CMYK SOURCE_COLOR_SPACE

The croped image is in RGB :/ 

*D:\raster>gdalinfo D:\raster\cmyk.tif*
Driver: GTiff/GeoTIFF
Files: D:\raster\cmyk.tif
       D:\raster\cmyk.tfw
Size is 11568, 20061
Coordinate System is `'
Origin = (191513.750000000000000,516826.250000000000000)
Pixel Size = (12.500000000000000,-12.500000000000000)
Metadata:
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
  TIFFTAG_XRESOLUTION=508
  TIFFTAG_YRESOLUTION=508
Image Structure Metadata:
  COMPRESSION=PACKBITS
  INTERLEAVE=BAND
  SOURCE_COLOR_SPACE=CMYK
Corner Coordinates:
Upper Left  (  191513.750,  516826.250)
Lower Left  (  191513.750,  266063.750)
Upper Right (  336113.750,  516826.250)
Lower Right (  336113.750,  266063.750)
Center      (  263813.750,  391445.000)
Band 1 Block=11568x1 Type=Byte, ColorInterp=Red
  Mask Flags: PER_DATASET ALPHA
Band 2 Block=11568x1 Type=Byte, ColorInterp=Green
  Mask Flags: PER_DATASET ALPHA
Band 3 Block=11568x1 Type=Byte, ColorInterp=Blue
  Mask Flags: PER_DATASET ALPHA
Band 4 Block=11568x1 Type=Byte, ColorInterp=Alpha

*D:\raster>gdalinfo D:\raster\cmyk_crop.tif*
Driver: GTiff/GeoTIFF
Files: D:\raster\cmyk_crop.tif
       D:\raster\cmyk_crop.tfw
Size is 80, 800
Coordinate System is `'
Origin = (191513.750000000000000,516826.250000000000000)
Pixel Size = (12.500000000000000,-12.500000000000000)
Metadata:
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
  TIFFTAG_XRESOLUTION=508
  TIFFTAG_YRESOLUTION=508
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (  191513.750,  516826.250)
Lower Left  (  191513.750,  506826.250)
Upper Right (  192513.750,  516826.250)
Lower Right (  192513.750,  506826.250)
Center      (  192013.750,  511826.250)
Band 1 Block=80x25 Type=Byte, ColorInterp=Red
  Mask Flags: PER_DATASET ALPHA
Band 2 Block=80x25 Type=Byte, ColorInterp=Green
  Mask Flags: PER_DATASET ALPHA
Band 3 Block=80x25 Type=Byte, ColorInterp=Blue
  Mask Flags: PER_DATASET ALPHA
Band 4 Block=80x25 Type=Byte, ColorInterp=Alpha



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/gdal-translate-crop-tiff-cmyk-tp5250378.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list