Photoshop layers is just a tag 37724 for tiff. (see Photoshop-specific TIFF Tags part at
http://paulbourke.net/dataformats/psdps ... 7409_72092 for example.)
When -define tiff:ignore-layers=true is used with identify, it is regarded as just a tag, otherwise (i.e. without -define tiff:ignore-layers=true) it is interpreted as scenes. So it returns info only for 1 scene.
With 6.9.9-40,
Code: Select all
$ identify -quiet -define tiff:ignore-layers=true -format '%[scene]\n' 10212_transparent_with_layers.tif
0
$ identify -quiet -format '%[scene]\n' 10212_transparent_with_layers.tif
0
1
2
3
Even if you use it with convert, it does not remove tag. So the result has still 37724 tag, that is regarded as scenes in the 2nd identify command.
However in this case, your file is somewhere broken, at least imagemagick failed to interpret 37724 (or other, maybe 34377) tag.
Code: Select all
% identify -version | head -1
Version: ImageMagick 6.9.9-40 Q16 x86_64 2018-11-24 http://www.imagemagick.org
% identify 10212_transparent_with_layers.tif
10212_transparent_with_layers.tif TIFF 535x1336 535x1336+0+0 8-bit CMYK 666200B 0.010u 0:00.000
identify: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/912.
identify: incorrect count for field "DateTimeOriginal" (21, expecting 20); tag trimmed. `0212_transparent_with_layers.tif' @ warning/tiff.c/TIFFWarnings/912.
identify: ASCII value for tag "DateTimeOriginal" does not end in null byte. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/912.
identify: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/912.
identify: improper image header `10212_transparent_with_layers.tif' @ error/psd.c/ReadPSDLayersInternal/1675.
The first 4 lines are warning, you may ignore them, but the last one is error.
Code: Select all
% identify -quiet 10212_transparent_with_layers.tif
10212_transparent_with_layers.tif TIFF 535x1336 535x1336+0+0 8-bit CMYK 666200B 0.000u 0:00.009
identify: improper image header `10212_transparent_with_layers.tif' @ error/psd.c/ReadPSDLayersInternal/1675.
I don't have the same version with you, but when I first convert the file with -define tiff:ignore-layers=true, it strips the broken part, so the output file is no longer complained by next identify command.
Code: Select all
% convert -quiet -define tiff:ignore-layers=true 10212_transparent_with_layers.tif output.tif
convert: improper image header `10212_transparent_with_layers.tif' @ error/psd.c/ReadPSDLayersInternal/1675.
$ identify output.tif
output.tif[0] TIFF 535x1336 535x1336+0+0 8-bit CMYK 658720B 0.010u 0:00.000
output.tif[1] TIFF 142x246 142x246+11+230 8-bit CMYK 0.000u 0:00.009
output.tif[2] TIFF 29x213 29x213+17+240 8-bit CMYK 0.000u 0:00.009
output.tif[3] TIFF 37x58 37x58+54+245 8-bit CMYK 0.000u 0:00.009
So I guess your Windows version happen to remove some photoshop related tag.
Anyway I continue to analyze with my version for now.
Here is tiffdump output:
Code: Select all
$ tiffdump 10212_transparent_with_layers.tif
10212_transparent_with_layers.tif:
Magic: 0x4949 <little-endian> Version: 0x2a <ClassicTIFF>
Directory 0: offset 8 (0x8) next 0 (0)
SubFileType (254) LONG (4) 1<0>
ImageWidth (256) SHORT (3) 1<535>
ImageLength (257) SHORT (3) 1<1336>
BitsPerSample (258) SHORT (3) 5<8 8 8 8 8>
Compression (259) SHORT (3) 1<5>
Photometric (262) SHORT (3) 1<5>
Make (271) ASCII (2) 6<Canon\0>
Model (272) ASCII (2) 14<Canon EOS D30\0>
StripOffsets (273) LONG (4) 14<579580 580452 581324 589228 597226 604286 605158 606030 606902 607774 608646 609518 610390 611262>
Orientation (274) SHORT (3) 1<1>
SamplesPerPixel (277) SHORT (3) 1<5>
RowsPerStrip (278) SHORT (3) 1<97>
StripByteCounts (279) LONG (4) 14<871 871 7903 7998 7060 871 871 871 871 871 871 871 871 762>
XResolution (282) RATIONAL (5) 1<300>
YResolution (283) RATIONAL (5) 1<300>
PlanarConfig (284) SHORT (3) 1<1>
ResolutionUnit (296) SHORT (3) 1<2>
Software (305) ASCII (2) 30<Adobe Photoshop CS6 (Win ...>
DateTime (306) ASCII (2) 20<2017:03:10 08:57:45\0>
Artist (315) ASCII (2) 19<Bernecker + Rainer\0>
Predictor (317) SHORT (3) 1<2>
ExtraSamples (338) SHORT (3) 1<1>
700 (0x2bc) BYTE (1) 17210<0x3c 0x3f 0x78 0x70 0x61 0x63 0x6b 0x65 0x74 0x20 0x62 0x65 0x67 0x69 0x6e 0x3d 0x22 0xef 0xbb 0xbf 0x22 0x20 0x69 0x64 ...>
33723 (0x83bb) UNDEFINED (7) 99<0x1c 0x1 0x5a 00 0x3 0x1b 0x25 0x47 0x1c 0x1 0x5a 00 0x3 0x1b 0x25 0x47 0x1c 0x1 0x5a 00 0x3 0x1b 0x25 0x47 ...>
34377 (0x8649) BYTE (1) 4528<0x38 0x42 0x49 0x4d 0x4 0x25 00 00 00 00 00 0x10 0xf8 0x5d 0x6e 0xb 0x9d 0xad 0xa6 0x95 0x63 0x46 0x42 0x49 ...>
34665 (0x8769) LONG (4) 1<612024>
ICC Profile (34675) UNDEFINED (7) 557164<00 0x8 0x80 0x6c 0x41 0x44 0x42 0x45 0x2 0x10 00 00 0x70 0x72 0x74 0x72 0x43 0x4d 0x59 0x4b 0x4c 0x61 0x62 0x20 ...>
37724 (0x935c) UNDEFINED (7) 53928<0x41 0x64 0x6f 0x62 0x65 0x20 0x50 0x68 0x6f 0x74 0x6f 0x73 0x68 0x6f 0x70 0x20 0x44 0x6f 0x63 0x75 0x6d 0x65 0x6e 0x74 ...>
Code: Select all
$ tiffdump output.tif
output.tif:
Magic: 0x4949 <little-endian> Version: 0x2a <ClassicTIFF>
Directory 0: offset 25506 (0x63a2) next 0 (0)
ImageWidth (256) SHORT (3) 1<535>
ImageLength (257) SHORT (3) 1<1336>
BitsPerSample (258) SHORT (3) 5<8 8 8 8 8>
Compression (259) SHORT (3) 1<5>
Photometric (262) SHORT (3) 1<5>
FillOrder (266) SHORT (3) 1<1>
StripOffsets (273) LONG (4) 1<8>
Orientation (274) SHORT (3) 1<1>
SamplesPerPixel (277) SHORT (3) 1<5>
RowsPerStrip (278) SHORT (3) 1<1336>
StripByteCounts (279) LONG (4) 1<25498>
XResolution (282) RATIONAL (5) 1<300>
YResolution (283) RATIONAL (5) 1<300>
PlanarConfig (284) SHORT (3) 1<1>
ResolutionUnit (296) SHORT (3) 1<2>
PageNumber (297) SHORT (3) 2<0 1>
Whitepoint (318) RATIONAL (5) 2<0.3127 0.329>
PrimaryChromaticities (319) RATIONAL (5) 6<0.64 0.33 0.3 0.6 0.15 0.06>
InkSet (332) SHORT (3) 1<1>
ExtraSamples (338) SHORT (3) 1<2>
700 (0x2bc) BYTE (1) 17210<0x3c 0x3f 0x78 0x70 0x61 0x63 0x6b 0x65 0x74 0x20 0x62 0x65 0x67 0x69 0x6e 0x3d 0x22 0xef 0xbb 0xbf 0x22 0x20 0x69 0x64 ...>
34377 (0x8649) BYTE (1) 4528<0x38 0x42 0x49 0x4d 0x4 0x25 00 00 00 00 00 0x10 0xf8 0x5d 0x6e 0xb 0x9d 0xad 0xa6 0x95 0x63 0x46 0x42 0x49 ...>
ICC Profile (34675) UNDEFINED (7) 557164<00 0x8 0x80 0x6c 0x41 0x44 0x42 0x45 0x2 0x10 00 00 0x70 0x72 0x74 0x72 0x43 0x4d 0x59 0x4b 0x4c 0x61 0x62 0x20 ...>
37724 (0x935c) UNDEFINED (7) 53928<0x41 0x64 0x6f 0x62 0x65 0x20 0x50 0x68 0x6f 0x74 0x6f 0x73 0x68 0x6f 0x70 0x20 0x44 0x6f 0x63 0x75 0x6d 0x65 0x6e 0x74 ...>
Null terminated tags are removed.
But, something seems to be odd. It does not change the 34377 and 37724 tag, at least for the length. Why only the original image (10212_transparent_with_layers.tif) has error?
I try to remove those tags to remove photoshop layer:
Code: Select all
% convert output.tif +profile "34377,37724" output2.tif
% tiffdump output2.tif
output2.tif:
Magic: 0x4949 <little-endian> Version: 0x2a <ClassicTIFF>
Directory 0: offset 25506 (0x63a2) next 671614 (0xa3f7e)
SubFileType (254) LONG (4) 1<2>
ImageWidth (256) SHORT (3) 1<535>
ImageLength (257) SHORT (3) 1<1336>
BitsPerSample (258) SHORT (3) 5<8 8 8 8 8>
Compression (259) SHORT (3) 1<5>
Photometric (262) SHORT (3) 1<5>
FillOrder (266) SHORT (3) 1<1>
StripOffsets (273) LONG (4) 1<8>
Orientation (274) SHORT (3) 1<1>
SamplesPerPixel (277) SHORT (3) 1<5>
RowsPerStrip (278) SHORT (3) 1<1336>
StripByteCounts (279) LONG (4) 1<25498>
XResolution (282) RATIONAL (5) 1<300>
YResolution (283) RATIONAL (5) 1<300>
PlanarConfig (284) SHORT (3) 1<1>
ResolutionUnit (296) SHORT (3) 1<2>
PageNumber (297) SHORT (3) 2<0 4>
Whitepoint (318) RATIONAL (5) 2<0.3127 0.329>
PrimaryChromaticities (319) RATIONAL (5) 6<0.64 0.33 0.3 0.6 0.15 0.06>
InkSet (332) SHORT (3) 1<1>
ExtraSamples (338) SHORT (3) 1<2>
700 (0x2bc) BYTE (1) 17210<0x3c 0x3f 0x78 0x70 0x61 0x63 0x6b 0x65 0x74 0x20 0x62 0x65 0x67 0x69 0x6e 0x3d 0x22 0xef 0xbb 0xbf 0x22 0x20 0x69 0x64 ...>
34377 (0x8649) BYTE (1) 4528<0x38 0x42 0x49 0x4d 0x4 0x25 00 00 00 00 00 0x10 0xf8 0x5d 0x6e 0xb 0x9d 0xad 0xa6 0x95 0x63 0x46 0x42 0x49 ...>
ICC Profile (34675) UNDEFINED (7) 557164<00 0x8 0x80 0x6c 0x41 0x44 0x42 0x45 0x2 0x10 00 00 0x70 0x72 0x74 0x72 0x43 0x4d 0x59 0x4b 0x4c 0x61 0x62 0x20 ...>
37724 (0x935c) UNDEFINED (7) 53928<0x41 0x64 0x6f 0x62 0x65 0x20 0x50 0x68 0x6f 0x74 0x6f 0x73 0x68 0x6f 0x70 0x20 0x44 0x6f 0x63 0x75 0x6d 0x65 0x6e 0x74 ...>
Directory 1: offset 671614 (0xa3f7e) next 1253086 (0x131ede)
SubFileType (254) LONG (4) 1<2>
ImageWidth (256) SHORT (3) 1<142>
ImageLength (257) SHORT (3) 1<246>
BitsPerSample (258) SHORT (3) 5<8 8 8 8 8>
Compression (259) SHORT (3) 1<5>
Photometric (262) SHORT (3) 1<5>
FillOrder (266) SHORT (3) 1<1>
StripOffsets (273) LONG (4) 1<658732>
Orientation (274) SHORT (3) 1<1>
SamplesPerPixel (277) SHORT (3) 1<5>
RowsPerStrip (278) SHORT (3) 1<246>
StripByteCounts (279) LONG (4) 1<12881>
XResolution (282) RATIONAL (5) 1<300>
YResolution (283) RATIONAL (5) 1<300>
PlanarConfig (284) SHORT (3) 1<1>
PageName (285) ASCII (2) 8<Ebene 1\0>
XPosition (286) RATIONAL (5) 1<0.0366667>
YPosition (287) RATIONAL (5) 1<0.766667>
ResolutionUnit (296) SHORT (3) 1<2>
PageNumber (297) SHORT (3) 2<1 4>
Whitepoint (318) RATIONAL (5) 2<0.3127 0.329>
PrimaryChromaticities (319) RATIONAL (5) 6<0.64 0.33 0.3 0.6 0.15 0.06>
InkSet (332) SHORT (3) 1<1>
ExtraSamples (338) SHORT (3) 1<2>
700 (0x2bc) BYTE (1) 17210<0x3c 0x3f 0x78 0x70 0x61 0x63 0x6b 0x65 0x74 0x20 0x62 0x65 0x67 0x69 0x6e 0x3d 0x22 0xef 0xbb 0xbf 0x22 0x20 0x69 0x64 ...>
34377 (0x8649) BYTE (1) 4528<0x38 0x42 0x49 0x4d 0x4 0x25 00 00 00 00 00 0x10 0xf8 0x5d 0x6e 0xb 0x9d 0xad 0xa6 0x95 0x63 0x46 0x42 0x49 ...>
ICC Profile (34675) UNDEFINED (7) 557164<00 0x8 0x80 0x6c 0x41 0x44 0x42 0x45 0x2 0x10 00 00 0x70 0x72 0x74 0x72 0x43 0x4d 0x59 0x4b 0x4c 0x61 0x62 0x20 ...>
Directory 2: offset 1253086 (0x131ede) next 1833374 (0x1bf99e)
SubFileType (254) LONG (4) 1<2>
ImageWidth (256) SHORT (3) 1<29>
ImageLength (257) SHORT (3) 1<213>
BitsPerSample (258) SHORT (3) 5<8 8 8 8 8>
Compression (259) SHORT (3) 1<5>
Photometric (262) SHORT (3) 1<5>
FillOrder (266) SHORT (3) 1<1>
StripOffsets (273) LONG (4) 1<1250960>
Orientation (274) SHORT (3) 1<1>
SamplesPerPixel (277) SHORT (3) 1<5>
RowsPerStrip (278) SHORT (3) 1<213>
StripByteCounts (279) LONG (4) 1<2125>
XResolution (282) RATIONAL (5) 1<300>
YResolution (283) RATIONAL (5) 1<300>
PlanarConfig (284) SHORT (3) 1<1>
PageName (285) ASCII (2) 12<X20 BR 7300\0>
XPosition (286) RATIONAL (5) 1<0.0566667>
YPosition (287) RATIONAL (5) 1<0.8>
ResolutionUnit (296) SHORT (3) 1<2>
PageNumber (297) SHORT (3) 2<2 4>
Whitepoint (318) RATIONAL (5) 2<0.3127 0.329>
PrimaryChromaticities (319) RATIONAL (5) 6<0.64 0.33 0.3 0.6 0.15 0.06>
InkSet (332) SHORT (3) 1<1>
ExtraSamples (338) SHORT (3) 1<2>
700 (0x2bc) BYTE (1) 17210<0x3c 0x3f 0x78 0x70 0x61 0x63 0x6b 0x65 0x74 0x20 0x62 0x65 0x67 0x69 0x6e 0x3d 0x22 0xef 0xbb 0xbf 0x22 0x20 0x69 0x64 ...>
34377 (0x8649) BYTE (1) 4528<0x38 0x42 0x49 0x4d 0x4 0x25 00 00 00 00 00 0x10 0xf8 0x5d 0x6e 0xb 0x9d 0xad 0xa6 0x95 0x63 0x46 0x42 0x49 ...>
ICC Profile (34675) UNDEFINED (7) 557164<00 0x8 0x80 0x6c 0x41 0x44 0x42 0x45 0x2 0x10 00 00 0x70 0x72 0x74 0x72 0x43 0x4d 0x59 0x4b 0x4c 0x61 0x62 0x20 ...>
Directory 3: offset 1833374 (0x1bf99e) next 0 (0)
SubFileType (254) LONG (4) 1<2>
ImageWidth (256) SHORT (3) 1<37>
ImageLength (257) SHORT (3) 1<58>
BitsPerSample (258) SHORT (3) 5<8 8 8 8 8>
Compression (259) SHORT (3) 1<5>
Photometric (262) SHORT (3) 1<5>
FillOrder (266) SHORT (3) 1<1>
StripOffsets (273) LONG (4) 1<1832436>
Orientation (274) SHORT (3) 1<1>
SamplesPerPixel (277) SHORT (3) 1<5>
RowsPerStrip (278) SHORT (3) 1<58>
StripByteCounts (279) LONG (4) 1<938>
XResolution (282) RATIONAL (5) 1<300>
YResolution (283) RATIONAL (5) 1<300>
PlanarConfig (284) SHORT (3) 1<1>
PageName (285) ASCII (2) 8<ST Tx \0>
XPosition (286) RATIONAL (5) 1<0.18>
YPosition (287) RATIONAL (5) 1<0.816667>
ResolutionUnit (296) SHORT (3) 1<2>
PageNumber (297) SHORT (3) 2<3 4>
Whitepoint (318) RATIONAL (5) 2<0.3127 0.329>
PrimaryChromaticities (319) RATIONAL (5) 6<0.64 0.33 0.3 0.6 0.15 0.06>
InkSet (332) SHORT (3) 1<1>
ExtraSamples (338) SHORT (3) 1<2>
700 (0x2bc) BYTE (1) 17210<0x3c 0x3f 0x78 0x70 0x61 0x63 0x6b 0x65 0x74 0x20 0x62 0x65 0x67 0x69 0x6e 0x3d 0x22 0xef 0xbb 0xbf 0x22 0x20 0x69 0x64 ...>
34377 (0x8649) BYTE (1) 4528<0x38 0x42 0x49 0x4d 0x4 0x25 00 00 00 00 00 0x10 0xf8 0x5d 0x6e 0xb 0x9d 0xad 0xa6 0x95 0x63 0x46 0x42 0x49 ...>
ICC Profile (34675) UNDEFINED (7) 557164<00 0x8 0x80 0x6c 0x41 0x44 0x42 0x45 0x2 0x10 00 00 0x70 0x72 0x74 0x72 0x43 0x4d 0x59 0x4b 0x4c 0x61 0x62 0x20 ...>
It does not strip 34377 tag, furthermore, the file turned into multi-
page (not layer) tiff. Even with -strip
Code: Select all
$ convert output.tif -strip output3.tif
$ tiffdump output3.tif
output3.tif:
Magic: 0x4949 <little-endian> Version: 0x2a <ClassicTIFF>
Directory 0: offset 25506 (0x63a2) next 38736 (0x9750)
SubFileType (254) LONG (4) 1<2>
ImageWidth (256) SHORT (3) 1<535>
ImageLength (257) SHORT (3) 1<1336>
BitsPerSample (258) SHORT (3) 5<8 8 8 8 8>
Compression (259) SHORT (3) 1<5>
Photometric (262) SHORT (3) 1<5>
FillOrder (266) SHORT (3) 1<1>
StripOffsets (273) LONG (4) 1<8>
Orientation (274) SHORT (3) 1<1>
SamplesPerPixel (277) SHORT (3) 1<5>
RowsPerStrip (278) SHORT (3) 1<1336>
StripByteCounts (279) LONG (4) 1<25498>
XResolution (282) RATIONAL (5) 1<300>
YResolution (283) RATIONAL (5) 1<300>
PlanarConfig (284) SHORT (3) 1<1>
ResolutionUnit (296) SHORT (3) 1<2>
PageNumber (297) SHORT (3) 2<0 4>
Whitepoint (318) RATIONAL (5) 2<0.3127 0.329>
PrimaryChromaticities (319) RATIONAL (5) 6<0.64 0.33 0.3 0.6 0.15 0.06>
InkSet (332) SHORT (3) 1<1>
ExtraSamples (338) SHORT (3) 1<2>
Directory 1: offset 38736 (0x9750) next 41270 (0xa136)
SubFileType (254) LONG (4) 1<2>
ImageWidth (256) SHORT (3) 1<142>
ImageLength (257) SHORT (3) 1<246>
BitsPerSample (258) SHORT (3) 5<8 8 8 8 8>
Compression (259) SHORT (3) 1<5>
Photometric (262) SHORT (3) 1<5>
FillOrder (266) SHORT (3) 1<1>
StripOffsets (273) LONG (4) 1<25854>
Orientation (274) SHORT (3) 1<1>
SamplesPerPixel (277) SHORT (3) 1<5>
RowsPerStrip (278) SHORT (3) 1<246>
StripByteCounts (279) LONG (4) 1<12881>
XResolution (282) RATIONAL (5) 1<300>
YResolution (283) RATIONAL (5) 1<300>
PlanarConfig (284) SHORT (3) 1<1>
PageName (285) ASCII (2) 8<Ebene 1\0>
XPosition (286) RATIONAL (5) 1<0.0366667>
YPosition (287) RATIONAL (5) 1<0.766667>
ResolutionUnit (296) SHORT (3) 1<2>
PageNumber (297) SHORT (3) 2<1 4>
Whitepoint (318) RATIONAL (5) 2<0.3127 0.329>
PrimaryChromaticities (319) RATIONAL (5) 6<0.64 0.33 0.3 0.6 0.15 0.06>
InkSet (332) SHORT (3) 1<1>
ExtraSamples (338) SHORT (3) 1<2>
Directory 2: offset 41270 (0xa136) next 42620 (0xa67c)
SubFileType (254) LONG (4) 1<2>
ImageWidth (256) SHORT (3) 1<29>
ImageLength (257) SHORT (3) 1<213>
BitsPerSample (258) SHORT (3) 5<8 8 8 8 8>
Compression (259) SHORT (3) 1<5>
Photometric (262) SHORT (3) 1<5>
FillOrder (266) SHORT (3) 1<1>
StripOffsets (273) LONG (4) 1<39144>
Orientation (274) SHORT (3) 1<1>
SamplesPerPixel (277) SHORT (3) 1<5>
RowsPerStrip (278) SHORT (3) 1<213>
StripByteCounts (279) LONG (4) 1<2125>
XResolution (282) RATIONAL (5) 1<300>
YResolution (283) RATIONAL (5) 1<300>
PlanarConfig (284) SHORT (3) 1<1>
PageName (285) ASCII (2) 12<X20 BR 7300\0>
XPosition (286) RATIONAL (5) 1<0.0566667>
YPosition (287) RATIONAL (5) 1<0.8>
ResolutionUnit (296) SHORT (3) 1<2>
PageNumber (297) SHORT (3) 2<2 4>
Whitepoint (318) RATIONAL (5) 2<0.3127 0.329>
PrimaryChromaticities (319) RATIONAL (5) 6<0.64 0.33 0.3 0.6 0.15 0.06>
InkSet (332) SHORT (3) 1<1>
ExtraSamples (338) SHORT (3) 1<2>
Directory 3: offset 42620 (0xa67c) next 0 (0)
SubFileType (254) LONG (4) 1<2>
ImageWidth (256) SHORT (3) 1<37>
ImageLength (257) SHORT (3) 1<58>
BitsPerSample (258) SHORT (3) 5<8 8 8 8 8>
Compression (259) SHORT (3) 1<5>
Photometric (262) SHORT (3) 1<5>
FillOrder (266) SHORT (3) 1<1>
StripOffsets (273) LONG (4) 1<41682>
Orientation (274) SHORT (3) 1<1>
SamplesPerPixel (277) SHORT (3) 1<5>
RowsPerStrip (278) SHORT (3) 1<58>
StripByteCounts (279) LONG (4) 1<938>
XResolution (282) RATIONAL (5) 1<300>
YResolution (283) RATIONAL (5) 1<300>
PlanarConfig (284) SHORT (3) 1<1>
PageName (285) ASCII (2) 8<ST Tx \0>
XPosition (286) RATIONAL (5) 1<0.18>
YPosition (287) RATIONAL (5) 1<0.816667>
ResolutionUnit (296) SHORT (3) 1<2>
PageNumber (297) SHORT (3) 2<3 4>
Whitepoint (318) RATIONAL (5) 2<0.3127 0.329>
PrimaryChromaticities (319) RATIONAL (5) 6<0.64 0.33 0.3 0.6 0.15 0.06>
InkSet (332) SHORT (3) 1<1>
ExtraSamples (338) SHORT (3) 1<2>
Code: Select all
$ identify -define tiff:ignore-layers=true output2.tif
output2.tif[0] TIFF 535x1336 535x1336+0+0 8-bit CMYK 2412720B 0.000u 0:00.000
output2.tif[1] TIFF 142x246 142x246+11+230 8-bit CMYK 2412720B 0.000u 0:00.000
output2.tif[2] TIFF 29x213 29x213+17+240 8-bit CMYK 2412720B 0.000u 0:00.009
output2.tif[3] TIFF 37x58 37x58+54+245 8-bit CMYK 2412720B 0.000u 0:00.009
$ identify -define tiff:ignore-layers=true output3.tif
output3.tif[0] TIFF 535x1336 535x1336+0+0 8-bit CMYK 43028B 0.000u 0:00.000
output3.tif[1] TIFF 142x246 142x246+11+230 8-bit CMYK 43028B 0.000u 0:00.000
output3.tif[2] TIFF 29x213 29x213+17+240 8-bit CMYK 43028B 0.000u 0:00.000
output3.tif[3] TIFF 37x58 37x58+54+245 8-bit CMYK 43028B 0.000u 0:00.000
So I think it is a bug in +profile and in -strip.
Using tiffset command, these tags can be removed.
Code: Select all
$ cp output.tif output4.tif
$ tiffset -u 34377 output4.tif
TIFFReadDirectory: Warning, Unknown field with tag 37724 (0x935c) encountered.
$ tiffset -u 37724 output4.tif
TIFFReadDirectory: Warning, Unknown field with tag 37724 (0x935c) encountered.
$ identify -define tiff:ignore-layers=true output4.tif
output4.tif TIFF 535x1336 535x1336+0+0 8-bit CMYK 1.77586MiB 0.010u 0:00.000
---
Edit:
Something is really odd.
If I specify the file at the current directory, identify does not output error, however it is specified as relative or absolute path, it output error.
Code: Select all
$ identify -quiet tmp6/10212_transparent_with_layers.tif
tmp6/10212_transparent_with_layers.tif TIFF 535x1336 535x1336+0+0 8-bit CMYK 666200B 0.000u 0:00.019
identify: improper image header `tmp6/10212_transparent_with_layers.tif' @ error/psd.c/ReadPSDLayersInternal/1675.
$ cd tmp6
$ identify -quiet ./10212_transparent_with_layers.tif
./10212_transparent_with_layers.tif[0] TIFF 535x1336 535x1336+0+0 8-bit CMYK 666200B 0.010u 0:00.009
./10212_transparent_with_layers.tif[1] TIFF 142x246 142x246+11+230 8-bit CMYK 0.000u 0:00.000
./10212_transparent_with_layers.tif[2] TIFF 29x213 29x213+17+240 8-bit CMYK 0.000u 0:00.000
./10212_transparent_with_layers.tif[3] TIFF 37x58 37x58+54+245 8-bit CMYK 0.000u 0:00.000
So the analyze above might be totally wrong.
Here is the version again. It comes from macport.
Code: Select all
% convert -version
Version: ImageMagick 6.9.9-40 Q16 x86_64 2018-11-24 http://www.imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules
Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype gslib gvc jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png ps raw rsvg tiff webp wmf x xml zlib