Problem with flattening 16-bit tiff file
Posted: 2017-11-14T10:13:10-07:00
Hello everyone,
I was given a task of converting a significant amount of tiff files (compression for archiving, creation of thumbnails in various sizes, etc).
But I got stuck on this particular file (and I'm almost sure there will be more like this one). It's 16-bit CMYK tiff image, when opened in photoshop I can't see no visible layers, adjustment layers or other. There is only one layer. To my surprise the image can be flatten from Layers menu.
Running identify command shows there is two scenes (layers??) where the second one is of 0B.
So I extract the layers to separate files with a for loop and convert command. The original image is quite big (366MB), but the resulting separate layers are of 366MB the first one, and the second one is 206MB!
I've tried running the convert command with flatten option but the resulting image was the same as original.
What am I missing here? Can't quite understand these ghost layers
Is there a way to flatten the image?
My config:
OSX 10.13.1
Version: ImageMagick 7.0.7-10 Q16 x86_64 2017-11-10
Verbose identify result below:
I was given a task of converting a significant amount of tiff files (compression for archiving, creation of thumbnails in various sizes, etc).
But I got stuck on this particular file (and I'm almost sure there will be more like this one). It's 16-bit CMYK tiff image, when opened in photoshop I can't see no visible layers, adjustment layers or other. There is only one layer. To my surprise the image can be flatten from Layers menu.
Running identify command shows there is two scenes (layers??) where the second one is of 0B.
Code: Select all
identify amb_gen_2016_11_07_A391_v19_composicion_04_CMYK_OK.tif
amb_gen_2016_11_07_A391_v19_composicion_04_CMYK_OK.tif[0] TIFF 4962x4962 4962x4962+0+0 16-bit CMYK 348.966MiB 0.710u 0:00.710
amb_gen_2016_11_07_A391_v19_composicion_04_CMYK_OK.tif[1] TIFF 4962x4962 4962x4962+0+0 16-bit CMYK 0.000u 0:00.009
identify: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/994.
I've tried running the convert command with flatten option but the resulting image was the same as original.
Code: Select all
convert amb_gen_2016_11_07_A391_v19_composicion_04_CMYK_OK.tif -flatten amb_gen_2016_11_07_A391_v19_composicion_04_CMYK_OK__flatten.tif
Is there a way to flatten the image?
My config:
OSX 10.13.1
Version: ImageMagick 7.0.7-10 Q16 x86_64 2017-11-10
Verbose identify result below:
Code: Select all
identify -verbose amb_gen_2016_11_07_A391_v19_composicion_04_CMYK_OK.tif
Image: amb_gen_2016_11_07_A391_v19_composicion_04_CMYK_OK.tif
Format: TIFF (Tagged Image File Format)
Mime type: image/tiff
Class: DirectClass
Geometry: 4962x4962+0+0
Resolution: 72x72
Print size: 68.9167x68.9167
Units: PixelsPerInch
Type: ColorSeparation
Endianess: LSB
Colorspace: CMYK
Depth: 16-bit
Channel depth:
Cyan: 16-bit
Magenta: 16-bit
Yellow: 16-bit
Black: 16-bit
Channel statistics:
Pixels: 24621444
Cyan:
min: 0 (0)
max: 65535 (1)
mean: 36152.9 (0.551657)
standard deviation: 9930.99 (0.151537)
kurtosis: 1.96284
skewness: -1.19673
entropy: 0.935601
Magenta:
min: 0 (0)
max: 65535 (1)
mean: 29491.9 (0.450017)
standard deviation: 8773.74 (0.133879)
kurtosis: 1.36817
skewness: -0.912291
entropy: 0.93126
Yellow:
min: 0 (0)
max: 65535 (1)
mean: 28834.9 (0.439993)
standard deviation: 9139.48 (0.13946)
kurtosis: 1.5819
skewness: 0.372745
entropy: 0.934154
Black:
min: 0 (0)
max: 65535 (1)
mean: 9935.17 (0.151601)
standard deviation: 11346.4 (0.173135)
kurtosis: 2.42632
skewness: 1.62065
entropy: 0.847379
Image statistics:
Overall:
min: 0 (0)
max: 65535 (1)
mean: 26103.7 (0.398317)
standard deviation: 13867.4 (0.211603)
kurtosis: -0.701145
skewness: -0.383758
entropy: 0.912099
Total ink density: 349.886%
Rendering intent: Perceptual
Gamma: 0.454545
Chromaticity:
red primary: (0.64,0.33)
green primary: (0.3,0.6)
blue primary: (0.15,0.06)
white point: (0.3127,0.329)
Matte color: grey74
Background color: white
Border color: srgb(223,223,223)
Transparent color: none
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 4962x4962+0+0
Dispose: Undefined
Iterations: 0
Scene: 0 of 2
Compression: None
Orientation: TopLeft
Properties:
date:create: 2017-11-14T17:00:17+01:00
date:modify: 2017-01-23T10:52:47+01:00
dc:format: image/tiff
exif:PixelXDimension: 4962
exif:PixelYDimension: 4962
icc:copyright: Copyright 2004-2007 Adobe Systems Incorporated
icc:description: Coated FOGRA27 (ISO 12647-2:2004)
icc:manufacturer: Coated FOGRA27 (ISO 12647-2:2004)
icc:model: Coated FOGRA27 (ISO 12647-2:2004)
photoshop:ColorMode: 4
photoshop:ICCProfile: Coated FOGRA27 (ISO 12647-2:2004)
signature: 258863ee982e51de9f4400d110e674fb365cc72b2c46bc9de156de68d7711b04
tiff:alpha: unspecified
tiff:endian: lsb
tiff:photometric: separated
tiff:rows-per-strip: 1
tiff:software: Adobe Photoshop CC 2015.5 (Windows)
tiff:timestamp: 2017:01:23 10:52:59
xmp:CreateDate: 2017-01-19T19:19:54+01:00
xmp:CreatorTool: Adobe Photoshop CC 2015.5 (Windows)
xmp:MetadataDate: 2017-01-23T10:52:59+01:00
xmp:ModifyDate: 2017-01-23T10:52:59+01:00
xmpMM:DerivedFrom: xmp.did:922cdef0-49e8-2b42-b60e-fb5037b3b588
xmpMM:DocumentID: adobe:docid:photoshop:b0075e85-e151-11e6-a809-8a43285e6d21
xmpMM:InstanceID: xmp.iid:c63b7eab-b425-1146-ba59-96bda20ca83c
xmpMM:OriginalDocumentID: xmp.did:922cdef0-49e8-2b42-b60e-fb5037b3b588
Profiles:
Profile-8bim: 11532 bytes
Profile-icc: 557188 bytes
Profile-tiff:37724: 168359964 bytes
Profile-xmp: 16246 bytes
Artifacts:
tiff:has-layers: true
verbose: true
Tainted: False
Filesize: 348.966MiB
Number pixels: 24.6214M
Pixels per second: 4.585MB
User time: 5.320u
Elapsed time: 0:06.369
Version: ImageMagick 7.0.7-10 Q16 x86_64 2017-11-10 http://www.imagemagick.org
Image: amb_gen_2016_11_07_A391_v19_composicion_04_CMYK_OK.tif
Format: TIFF (Tagged Image File Format)
Mime type: image/tiff
Class: DirectClass
Geometry: 4962x4962+0+0
Resolution: 72x72
Print size: 68.9167x68.9167
Units: PixelsPerInch
Type: ColorSeparationAlpha
Endianess: LSB
Colorspace: CMYK
Depth: 16-bit
Channel depth:
Cyan: 16-bit
Magenta: 16-bit
Yellow: 16-bit
Black: 16-bit
Alpha: 1-bit
Channel statistics:
Pixels: 24621444
Cyan:
min: 0 (0)
max: 65535 (1)
mean: 36152.9 (0.551657)
standard deviation: 9930.99 (0.151537)
kurtosis: 1.96284
skewness: -1.19673
entropy: 0.935601
Magenta:
min: 0 (0)
max: 65535 (1)
mean: 29491.9 (0.450017)
standard deviation: 8773.74 (0.133879)
kurtosis: 1.36817
skewness: -0.912291
entropy: 0.93126
Yellow:
min: 0 (0)
max: 65535 (1)
mean: 28834.9 (0.439993)
standard deviation: 9139.48 (0.13946)
kurtosis: 1.5819
skewness: 0.372745
entropy: 0.934154
Black:
min: 0 (0)
max: 65535 (1)
mean: 9935.17 (0.151601)
standard deviation: 11346.4 (0.173135)
kurtosis: 2.42632
skewness: 1.62065
entropy: 0.847379
Alpha:
min: 65535 (1)
max: 65535 (1)
mean: 65535 (1)
standard deviation: nan (nan)
kurtosis: 2.19554e+69
skewness: 5.58219e+49
entropy: nan
Image statistics:
Overall:
min: 0 (0)
max: 65535 (1)
mean: 33990 (0.518654)
standard deviation: 20065.3 (0.306177)
kurtosis: -0.826149
skewness: 0.17666
entropy: nan
Total ink density: 349.886%
Rendering intent: Perceptual
Gamma: 0.454545
Chromaticity:
red primary: (0.64,0.33)
green primary: (0.3,0.6)
blue primary: (0.15,0.06)
white point: (0.3127,0.329)
Matte color: grey74
Background color: white
Border color: srgb(223,223,223)
Transparent color: none
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 4962x4962+0+0
Dispose: Undefined
Iterations: 0
Scene: 1 of 2
Compression: Zip
Orientation: TopLeft
Properties:
date:create: 2017-11-14T17:38:17+01:00
date:modify: 2017-11-14T17:38:17+01:00
dc:format: image/tiff
exif:PixelXDimension: 4962
exif:PixelYDimension: 4962
icc:copyright: Copyright 2004-2007 Adobe Systems Incorporated
icc:description: Coated FOGRA27 (ISO 12647-2:2004)
icc:manufacturer: Coated FOGRA27 (ISO 12647-2:2004)
icc:model: Coated FOGRA27 (ISO 12647-2:2004)
label: amb_gen_2016_11_07_A391_v19_Sin
photoshop:ColorMode: 4
photoshop:ICCProfile: Coated FOGRA27 (ISO 12647-2:2004)
signature: 737e2e458c838337ace6931bec7e400d0aeb71bada93c297a28b5da7958ce99f
tiff:alpha: unspecified
tiff:endian: lsb
tiff:photometric: separated
tiff:rows-per-strip: 1
tiff:software: Adobe Photoshop CC 2015.5 (Windows)
tiff:timestamp: 2017:01:23 10:52:59
xmp:CreateDate: 2017-01-19T19:19:54+01:00
xmp:CreatorTool: Adobe Photoshop CC 2015.5 (Windows)
xmp:MetadataDate: 2017-01-23T10:52:59+01:00
xmp:ModifyDate: 2017-01-23T10:52:59+01:00
xmpMM:DerivedFrom: xmp.did:922cdef0-49e8-2b42-b60e-fb5037b3b588
xmpMM:DocumentID: adobe:docid:photoshop:b0075e85-e151-11e6-a809-8a43285e6d21
xmpMM:InstanceID: xmp.iid:c63b7eab-b425-1146-ba59-96bda20ca83c
xmpMM:OriginalDocumentID: xmp.did:922cdef0-49e8-2b42-b60e-fb5037b3b588
Profiles:
Profile-8bim: 11532 bytes
Profile-icc: 557188 bytes
Profile-psd:additional-info: 364 bytes
Profile-xmp: 16246 bytes
Artifacts:
psd:layer.opacity: 65535
psd:layer.x: 0
psd:layer.y: 0
tiff:has-layers: true
verbose: true
Tainted: False
Filesize: 0B
Number pixels: 24.6214M
Pixels per second: 1.80377MB
User time: 13.520u
Elapsed time: 0:14.650
Version: ImageMagick 7.0.7-10 Q16 x86_64 2017-11-10 http://www.imagemagick.org
identify: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/994.