Page 1 of 1

Problem with flattening 16-bit tiff file

Posted: 2017-11-14T10:13:10-07:00
by ApronJon
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.

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.
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.

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
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:

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.


Re: Problem with flattening 16-bit tiff file

Posted: 2017-11-14T10:30:47-07:00
by fmw42
Please post an example TIFF image that shows the problem so that we can examine it.

From your verbose listing and comments, it would appear to be a two-page (not two-layer) image. The first page is CMYK. The second page is CMYKA. I would recommend that you convert to sRGB before flattening preferably using profiles. Your image has a Coated FOGRA27 icc profile.

Try

Code: Select all

convert amb_gen_2016_11_07_A391_v19_composicion_04_CMYK_OK.tif -profile path2/sRGB.icc -flatten result_flattened.tif
where path2/ is your path to where you have your sRGB.icc profile.

Re: Problem with flattening 16-bit tiff file

Posted: 2017-11-14T10:38:10-07:00
by snibgo
Sorry, the file is too large for me to download.

The statistics you show for the two images are identical, so I suspect they are identical. The second image has an alpha channel, but it is entirely 100%. Flattening them together is pointless.

They are both CMYK with embedded profiles. Do you want sRGB results? If so, you should convert them with a profile, for example:

Code: Select all

magick amb_gen_2016_11_07_A391_v19_composicion_04_CMYK_OK.tif[0]  -profile sRGB.icc out.tiff

Re: Problem with flattening 16-bit tiff file

Posted: 2017-11-14T10:54:25-07:00
by fmw42
Good catch, snibgo, about the alpha channel being fully opaque. I overlooked that. So flattening makes no sense. The second would cover the first.

If we have misunderstood the issue, please post a smaller example image and the result of your flattening it in ImageMagick and in Photoshop.

The only other thing I can think of is that IM pages are reversed from PS pages in TIFF. So add +swap and see if that gives the result you want.

Code: Select all

convert amb_gen_2016_11_07_A391_v19_composicion_04_CMYK_OK.tif +swap -profile path2/sRGB.icc -flatten result_flattened.tif

Re: Problem with flattening 16-bit tiff file

Posted: 2017-11-15T04:12:27-07:00
by ApronJon
Thanks @fmw42 and @snigbo for your fast responses

I'll try to explain myself better why I'd like to flatten the image like this:
First is to make it smaller in 'weight' and second to compress it to the maximum.
Right now the "-compress Zip -quality 9" is resulting in image way bigger then the input (369MB -> 612MB !!!!). That's very confusing. Or I do not understand how compression works.
(For the MIFF and TIFF image formats, quality/10 is the Zip/BZip compression level, which is 0 (worst but fastest compression) to 9 (best but slowest). It has no effect on the image appearance, since the compression is always lossless.)https://www.imagemagick.org/script/comm ... hp#quality
My workflow will be:
  • get tiff
  • if tiff has layers -> flatten
  • zip it, max compression (preserving original color profile)
  • if tiff is 16-bit -> convert to 8 bit
  • make jpeg from 8-bit tiff with sRGB profile (under control)
  • make thumbnails (under control)
The thumbnail part got it covert with Python and PIL, but PIL doesn't work with 16-bit tiff that's why I need to convert to 8-bit.

Here you can download the images:
Original:
https://drive.google.com/file/d/13RWw_a ... sp=sharing
Smaller:
https://drive.google.com/file/d/1aszkb_ ... sp=sharing
Shrinking the image in Photoshop has given slightly different result: Alpha channel gone from 1% to 100%
Shrinked image 'identify' result:

Code: Select all

identify -verbose amb_gen_2016_11_07_A391_v19_composicion_04_CMYK_OK_copia.tif 
Image: amb_gen_2016_11_07_A391_v19_composicion_04_CMYK_OK_copia.tif
  Format: TIFF (Tagged Image File Format)
  Mime type: image/tiff
  Class: DirectClass
  Geometry: 1241x1241+0+0
  Resolution: 72x72
  Print size: 17.2361x17.2361
  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: 1540081
    Cyan:
      min: 0  (0)
      max: 65535 (1)
      mean: 36149.8 (0.551611)
      standard deviation: 9863.91 (0.150514)
      kurtosis: 1.93817
      skewness: -1.19573
      entropy: 0.942654
    Magenta:
      min: 0  (0)
      max: 65535 (1)
      mean: 29490 (0.449989)
      standard deviation: 8703.09 (0.132801)
      kurtosis: 1.36007
      skewness: -0.940867
      entropy: 0.944422
    Yellow:
      min: 0  (0)
      max: 65535 (1)
      mean: 28827.5 (0.43988)
      standard deviation: 9057.89 (0.138215)
      kurtosis: 1.40823
      skewness: 0.34324
      entropy: 0.936812
    Black:
      min: 0  (0)
      max: 65535 (1)
      mean: 10006.4 (0.152687)
      standard deviation: 11158.6 (0.17027)
      kurtosis: 2.28728
      skewness: 1.59884
      entropy: 0.868155
  Image statistics:
    Overall:
      min: 0  (0)
      max: 65535 (1)
      mean: 26118.4 (0.398542)
      standard deviation: 13770.8 (0.210128)
      kurtosis: -0.721402
      skewness: -0.389052
      entropy: 0.923011
  Total ink density: 393.283%
  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: 1241x1241+0+0
  Dispose: Undefined
  Iterations: 0
  Scene: 0 of 2
  Compression: None
  Orientation: TopLeft
  Properties:
    date:create: 2017-11-15T11:11:53+01:00
    date:modify: 2017-11-15T11:11:53+01:00
    dc:format: image/tiff
    exif:PixelXDimension: 1241
    exif:PixelYDimension: 1241
    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: 821a28a36c7810719a4f4032f05cdb0da648349bf5803e79c054ec2d78973a32
    tiff:alpha: unspecified
    tiff:endian: lsb
    tiff:photometric: separated
    tiff:rows-per-strip: 1
    tiff:software: Adobe Photoshop CC (Macintosh)
    tiff:timestamp: 2017:11:15 11:11:14
    xmp:CreateDate: 2017-01-19T19:19:54+01:00
    xmp:CreatorTool: Adobe Photoshop CC 2015.5 (Windows)
    xmp:MetadataDate: 2017-11-15T11:11:14+01:00
    xmp:ModifyDate: 2017-11-15T11:11:14+01:00
    xmpMM:DerivedFrom: xmp.did:922cdef0-49e8-2b42-b60e-fb5037b3b588
    xmpMM:DocumentID: adobe:docid:photoshop:16a9b9a7-2cd2-ac45-9834-7c2ccb7996eb
    xmpMM:InstanceID: xmp.iid:e1616142-9b59-44e0-b6e1-185eea8fb394
    xmpMM:OriginalDocumentID: xmp.did:922cdef0-49e8-2b42-b60e-fb5037b3b588
  Profiles:
    Profile-8bim: 9966 bytes
    Profile-icc: 557188 bytes
    Profile-tiff:37724: 10956164 bytes
    Profile-xmp: 16685 bytes
  Artifacts:
    tiff:has-layers: true
    verbose: true
  Tainted: False
  Filesize: 22.7557MiB
  Number pixels: 1.54008M
  Pixels per second: 2.33346MB
  User time: 0.300u
  Elapsed time: 0:01.660
  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_copia.tif
  Format: TIFF (Tagged Image File Format)
  Mime type: image/tiff
  Class: DirectClass
  Geometry: 1241x1241+0+0
  Resolution: 72x72
  Print size: 17.2361x17.2361
  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: 16-bit
  Channel statistics:
    Pixels: 1540081
    Cyan:
      min: 0  (0)
      max: 65535 (1)
      mean: 36156.3 (0.551709)
      standard deviation: 9865.78 (0.150542)
      kurtosis: 1.93864
      skewness: -1.19598
      entropy: 0.942661
    Magenta:
      min: 0  (0)
      max: 65535 (1)
      mean: 29495.3 (0.450069)
      standard deviation: 8704.47 (0.132822)
      kurtosis: 1.36083
      skewness: -0.941183
      entropy: 0.944412
    Yellow:
      min: 0  (0)
      max: 65535 (1)
      mean: 28832.3 (0.439952)
      standard deviation: 9058.54 (0.138224)
      kurtosis: 1.4107
      skewness: 0.34334
      entropy: 0.936791
    Black:
      min: 0  (0)
      max: 65535 (1)
      mean: 10008.1 (0.152714)
      standard deviation: 11160.8 (0.170302)
      kurtosis: 2.28721
      skewness: 1.59886
      entropy: 0.868155
    Alpha:
      min: 58935  (0.89929)
      max: 65535 (1)
      mean: 65524.1 (0.999834)
      standard deviation: 192.1 (0.00293126)
      kurtosis: 307.704
      skewness: -17.5742
      entropy: 0.0197541
  Image statistics:
    Overall:
      min: 0  (0)
      max: 65535 (1)
      mean: 34003.2 (0.518856)
      standard deviation: 20003.9 (0.30524)
      kurtosis: -0.824589
      skewness: 0.183874
      entropy: 0.742355
  Total ink density: 393.283%
  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: 1241x1241+0+0
  Dispose: Undefined
  Iterations: 0
  Scene: 1 of 2
  Compression: Zip
  Orientation: TopLeft
  Properties:
    date:create: 2017-11-15T11:15:17+01:00
    date:modify: 2017-11-15T11:15:17+01:00
    dc:format: image/tiff
    exif:PixelXDimension: 1241
    exif:PixelYDimension: 1241
    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: 81671977639b68ec2e5deb1caf111b3419c558599812c3a9d11f0afdee4cdcbc
    tiff:alpha: unspecified
    tiff:endian: lsb
    tiff:photometric: separated
    tiff:rows-per-strip: 1
    tiff:software: Adobe Photoshop CC (Macintosh)
    tiff:timestamp: 2017:11:15 11:11:14
    xmp:CreateDate: 2017-01-19T19:19:54+01:00
    xmp:CreatorTool: Adobe Photoshop CC 2015.5 (Windows)
    xmp:MetadataDate: 2017-11-15T11:11:14+01:00
    xmp:ModifyDate: 2017-11-15T11:11:14+01:00
    xmpMM:DerivedFrom: xmp.did:922cdef0-49e8-2b42-b60e-fb5037b3b588
    xmpMM:DocumentID: adobe:docid:photoshop:16a9b9a7-2cd2-ac45-9834-7c2ccb7996eb
    xmpMM:InstanceID: xmp.iid:e1616142-9b59-44e0-b6e1-185eea8fb394
    xmpMM:OriginalDocumentID: xmp.did:922cdef0-49e8-2b42-b60e-fb5037b3b588
  Profiles:
    Profile-8bim: 9966 bytes
    Profile-icc: 557188 bytes
    Profile-psd:additional-info: 364 bytes
    Profile-xmp: 16685 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: 1.54008M
  Pixels per second: 1.90133MB
  User time: 0.810u
  Elapsed time: 0:01.809
  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.

Re: Problem with flattening 16-bit tiff file

Posted: 2017-11-15T04:35:30-07:00
by snibgo
You can flatten your same-size opaque images if you want, but the result will be exactly equal to whichever image was on top.

You say you have shrunk the image in Photoshop, but this gives alpha values:

Code: Select all

min: 58935 (0.89929) 
max: 65535 (1)
So now the image has acquired transparency?

Re: Problem with flattening 16-bit tiff file

Posted: 2017-11-15T04:56:39-07:00
by ApronJon
From "identify" result seems like it did acquired transparency, but no alpha channel visible in Photoshop.

The '+swap' thing seems like it did the trick, image got flat.
Still can't understand why swapping (pages/layers) is helping to flatten it.
BlackImageMagick :)

Re: Problem with flattening 16-bit tiff file

Posted: 2017-11-15T10:17:56-07:00
by fmw42
Photoshop flattens pages in the reverse order to ImageMagick. So the image you want is on top when flattening completely covering the other image, if they both are truly fully opaque.

Re: Problem with flattening 16-bit tiff file

Posted: 2017-11-17T07:07:27-07:00
by ApronJon
Has it something to do with the fact that the files might be '.exr' saved as .'tif' ?