The previous identify output was indeed from an old ImageMagick as you suspected (6.2.8 from CentOS 5.10). Below is the output from 6.8.9-2, which reverses the Alpha min/max.
Although the post subject references PNG, that's mainly because converting to PNG was the easiest way to reproduce the fault. What I'm ultimately trying to work out is why:
(which currently yields an opaque background with a statue-shaped hole in the middle) doesn't yield an image that is visually the same as
(which currently yields an opaque background with an opaque statue on it, the desired output).
Using the -channel A -negate +channel flags suggested inverts the problem, as you might expect; I get an opaque statue on a missing (transparent in PNG, blank in JPEG) background.
looks as expected. I'm not sure I can apply it generally; I'd imagine other TIFFs may start rendering incorrectly if I do.
I've been given permission to release the image for analysis; I'd prefer not to post it publicly though. Also it's fairly huge, but if I scale the TIFF down, the scaled TIFF exhibits the same behaviour, so I should be able to email it.
Code: Select all
Image: test.tif
Format: TIFF (Tagged Image File Format)
Mime type: image/tiff
Class: DirectClass
Geometry: 5455x7800+0+0
Resolution: 300x300
Print size: 18.1833x26
Units: PixelsPerInch
Type: TrueColorAlpha
Base type: TrueColor
Endianess: MSB
Colorspace: sRGB
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
alpha: 8-bit
Channel statistics:
Red:
min: 0 (0)
max: 255 (1)
mean: 107.753 (0.422563)
standard deviation: 48.7701 (0.191255)
kurtosis: -0.870765
skewness: 0.643677
Green:
min: 0 (0)
max: 255 (1)
mean: 107.246 (0.420573)
standard deviation: 49.1459 (0.192729)
kurtosis: -0.844846
skewness: 0.65519
Blue:
min: 0 (0)
max: 255 (1)
mean: 110.313 (0.4326)
standard deviation: 48.5394 (0.190351)
kurtosis: -0.770726
skewness: 0.670742
Alpha:
min: 0 (0)
max: 255 (1)
mean: 146.287 (0.573673)
standard deviation: 125.801 (0.493338)
kurtosis: -1.90738
skewness: 0.299661
Image statistics:
Overall:
min: 0 (0)
max: 255 (1)
mean: 108.506 (0.425516)
standard deviation: 75.7889 (0.297211)
kurtosis: -0.642203
skewness: 0.478855
Alpha: srgba(205,208,213,0) #CDD0D500
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)
Background color: white
Border color: srgba(223,223,223,1)
Matte color: grey74
Transparent color: none
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 5455x7800+0+0
Dispose: Undefined
Iterations: 0
Compression: None
Orientation: TopLeft
Properties:
date:create: 2014-06-04T16:59:03+01:00
date:modify: 2014-06-04T16:37:54+01:00
dc:format: image/tiff
exif:ColorSpace: 65535
exif:ExifVersion: 0220
exif:NativeDigest: 36864,40960,40961,37121,37122,40962,40963,37510,40964,36867,36868,33434,33437,34850,34852,34855,34856,37377,37378,37379,37380,37381,37382,37383,37384,37385,37386,37396,41483,41484,41486,41487,41488,41492,41493,41495,41728,41729,41730,41985,41986,41987,41988,41989,41990,41991,41992,41993,41994,41995,41996,42016,0,2,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,22,23,24,25,26,27,28,30;45EFCA6B5348E33FA8C494A0A4B50974
exif:PixelXDimension: 5455
exif:PixelYDimension: 7800
Iptc4xmpCore:CiAdrCity: XXX
Iptc4xmpCore:CiAdrCtry: XXX
Iptc4xmpCore:CiAdrExtadr: XXX
Iptc4xmpCore:CiAdrPcode: XXX
Iptc4xmpCore:CiAdrRegion: XXX
Iptc4xmpCore:CiEmailWork: XXX
XXX
Iptc4xmpCore:CiTelWork: XXX
XXX
Iptc4xmpCore:CiUrlWork: XXX
photoshop:AuthorsPosition: XXX
photoshop:CaptionWriter: XXX
photoshop:City: XXX
photoshop:ColorMode: 3
photoshop:Country: XXX
photoshop:Credit: XXX
photoshop:DateCreated: 2014-05-19
photoshop:EmbeddedXMPDigest: 00000000000000000000000000000000
photoshop:ICCProfile: Adobe RGB (1998)
photoshop:Instructions: IMAGE IS COPYRIGHTED. NO REPRODUCTION RIGHTS GRANTED.
photoshop:LegacyIPTCDigest: 265171117A8F70DEAB19B4FD1302AE5E
signature: ebca6a6bc92f16d9084e8f44d1fdb5eecbb83f6d7bff6229241cc0ce41b0bda2
tiff:alpha: unassociated
tiff:artist: XXX
tiff:Compression: 1
tiff:copyright: XXX
tiff:endian: lsb
tiff:ImageLength: 7800
tiff:ImageWidth: 5455
tiff:NativeDigest: 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;B5A81E74396D39090C9CB26F2D4581D4
tiff:Orientation: 1
tiff:photometric: RGB
tiff:PhotometricInterpretation: 2
tiff:PlanarConfiguration: 1
tiff:ResolutionUnit: 2
tiff:rows-per-strip: 1
tiff:SamplesPerPixel: 4
tiff:software: Adobe Photoshop CS4 Windows
tiff:timestamp: 2014:06:03 13:15:08
tiff:XResolution: 3000000/10000
tiff:YResolution: 3000000/10000
xmp:CreateDate: 2014-05-19T12:53:01+01:00
xmp:CreatorTool: Adobe Photoshop CC (Macintosh)
xmp:MetadataDate: 2014-06-03T13:15:08+01:00
xmp:ModifyDate: 2014-06-03T13:15:08+01:00
xmpMM:DocumentID: 402D3D8D0181D7EEFFEF8BA00F52EE0E
xmpMM:InstanceID: xmp.iid:A2D7E5B908EBE311823ACFD353854549
xmpMM:OriginalDocumentID: 402D3D8D0181D7EEFFEF8BA00F52EE0E
xmpRights:Marked: True
Profiles:
Profile-8bim: 6396 bytes
Profile-icc: 560 bytes
Profile-iptc: 568 bytes
unknown[1,0]:
City[1,90]: 0x00000000: 254700 -%
City[1,90]: 0x00000000: 254700 -%
unknown[2,0]:
Caption Writer[2,122]: XXX
Special Instructions[2,40]: IMAGE IS COPYRIGHTED. NO REPRODUCTION RIGHTS GRANTED.
Byline[2,80]: XXX
Byline Title[2,85]: Photographer
Credit[2,110]: XXX
Created Date[2,55]: 20140519
City[2,90]: XXX
Country[2,101]: XXX
Copyright String[2,116]: XXX
Created Time[2,60]: 125301+0100
Custom Field 9[2,208]: XXX
Custom Field 10[2,209]: XXX
Custom Field 11[2,210]: XXX
Custom Field 12[2,211]: XXX
Custom Field 13[2,212]: XXX
Custom Field 14[2,213]: XXX
Custom Field 15[2,214]: XXX
Custom Field 16[2,215]: XXX
Profile-xmp: 20288 bytes
Artifacts:
filename: test.tif
verbose: true
Tainted: False
Filesize: 170.2MB
Number pixels: 42.55M
Pixels per second: 16.82MB
User time: 2.500u
Elapsed time: 0:03.529
Version: ImageMagick 6.8.9-2 Q16 x86_64 2014-06-04 http://www.imagemagick.org