Thanks for your quick answer.
There is no luck. I have tried with:
- finalImage.defineValue("tiff:alpha", "associated");
- finalImage.defineValue("", "tiff:alpha", "associated");
- finalImage.defineValue("tiff", "tiff:alpha", "associated");
This is the code Im executing when writting the image after some composite calls with CopyCompositeOp:
Code: Select all
finalImage.compressType(LZWCompression);
finalImage.defineValue("tiff:alpha", "associated");
finalImage.write(tempFileName);
///////////////////////////////////
// SAVED WITH MAGICK++
///////////////////////////////////
[root@pegaso img]# tiffinfo bgr_tst0010_scn0001.0101.tif
TIFF Directory at offset 0x2abd8 (175064)
Image Width: 500 Image Length: 500
Resolution: 72, 72 (unitless)
Bits/Sample: 8
Compression Scheme: LZW
Photometric Interpretation: RGB color
Extra Samples: 1<unassoc-alpha>
FillOrder: lsb-to-msb
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 4
Rows/Strip: 4
Planar Configuration: single image plane
Page Number: 0-1
DocumentName: /tmp/bgr_tst0010_scn0001.0101.tif
Predictor: horizontal differencing 2 (0x2)
[root@pegaso img]# identify -verbose bgr_tst0010_scn0001.0101.tif
Image: bgr_tst0010_scn0001.0101.tif
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 500x500+0+0
Resolution: 72x72
Print size: 6.94444x6.94444
Units: Undefined
Type: TrueColorMatte
Base type: TrueColor
Endianess: LSB
Colorspace: RGB
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
alpha: 8-bit
Channel statistics:
Red:
min: 0 (0)
max: 202 (0.792157)
mean: 20.1385 (0.0789746)
standard deviation: 45.4869 (0.17838)
kurtosis: 2.48223
skewness: 2.00216
Green:
min: 0 (0)
max: 165 (0.647059)
mean: 12.2329 (0.0479723)
standard deviation: 29.0318 (0.11385)
kurtosis: 4.95114
skewness: 2.39517
Blue:
min: 0 (0)
max: 136 (0.533333)
mean: 4.35831 (0.0170914)
standard deviation: 13.9834 (0.054837)
kurtosis: 29.2704
skewness: 4.9797
Alpha:
min: 0 (0)
max: 255 (1)
mean: 47.1342 (0.18484)
standard deviation: 95.2149 (0.373392)
kurtosis: 0.89726
skewness: -1.68605
Image statistics:
Overall:
min: 0 (0)
max: 255 (1)
mean: 61.1489 (0.2398)
standard deviation: 55.1664 (0.216339)
kurtosis: 27.7998
skewness: 7.7031
Alpha: none #00000000
Rendering intent: Undefined
Interlace: None
Background color: white
Border color: rgba(223,223,223,1)
Matte color: grey74
Transparent color: none
Compose: Over
Page geometry: 500x500+0+0
Dispose: Undefined
Iterations: 0
Compression: LZW
Orientation: TopLeft
Properties:
date:create: 2013-03-08T13:58:15+01:00
date:modify: 2013-03-08T13:58:15+01:00
signature: c8cf4265021a99e0bcc61fa45a68494344da0bd26ec974b6a67577f1f09152f5
tiff:alpha: unassociated
tiff:document: /tmp/bgr_tst0010_scn0001.0101.tif
tiff:endian: lsb
tiff:photometric: RGB
tiff:rows-per-strip: 4
Artifacts:
verbose: true
Tainted: False
Filesize: 176KBB
Number pixels: 250KB
Pixels per second: 12.5MB
User time: 0.020u
Elapsed time: 0:01.020
Version: ImageMagick 6.6.9-3 2011-04-06 Q16
http://www.imagemagick.org
//////////////////////////////////////////////////////
// RESAVED WITH CONVERT -define tiff:alpha=associated
// (convert -define tiff:alpha=associated bgr_tst0010_scn0001.0101.tif bgr_tst0010_scn0001.0101.tif)
//////////////////////////////////////////////////////
[root@pegaso img]# tiffinfo bgr_tst0010_scn0001.0101.tif
TIFF Directory at offset 0x2aa06 (174598)
Image Width: 500 Image Length: 500
Resolution: 72, 72 (unitless)
Bits/Sample: 8
Compression Scheme: LZW
Photometric Interpretation: RGB color
Extra Samples: 1<assoc-alpha>
FillOrder: lsb-to-msb
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 4
Rows/Strip: 4
Planar Configuration: single image plane
Page Number: 0-1
DocumentName: bgr_tst0010_scn0001.0101.tif
Predictor: horizontal differencing 2 (0x2)
[root@pegaso img]# identify -verbose bgr_tst0010_scn0001.0101.tif
Image: bgr_tst0010_scn0001.0101.tif
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 500x500+0+0
Resolution: 72x72
Print size: 6.94444x6.94444
Units: Undefined
Type: TrueColorMatte
Base type: TrueColor
Endianess: LSB
Colorspace: RGB
Depth: 8/16-bit
Channel depth:
red: 16-bit
green: 16-bit
blue: 16-bit
alpha: 8-bit
Channel statistics:
Red:
min: 0 (0)
max: 202 (0.792157)
mean: 20.1478 (0.0790109)
standard deviation: 45.491 (0.178396)
kurtosis: 2.46593
skewness: 1.99929
Green:
min: 0 (0)
max: 165 (0.64567)
mean: 12.253 (0.048051)
standard deviation: 29.0735 (0.114014)
kurtosis: 4.93188
skewness: 2.39282
Blue:
min: 0 (0)
max: 136 (0.531502)
mean: 4.36667 (0.0171242)
standard deviation: 14.0082 (0.054934)
kurtosis: 29.2376
skewness: 4.97771
Alpha:
min: 0 (0)
max: 255 (1)
mean: 47.1342 (0.18484)
standard deviation: 95.2149 (0.373392)
kurtosis: 0.89726
skewness: -1.68605
Image statistics:
Overall:
min: 0 (0)
max: 255 (1)
mean: 61.1583 (0.239837)
standard deviation: 55.1743 (0.21637)
kurtosis: 27.7761
skewness: 7.69792
Alpha: none #00000000
Rendering intent: Undefined
Interlace: None
Background color: white
Border color: rgba(223,223,223,1)
Matte color: grey74
Transparent color: none
Compose: Over
Page geometry: 500x500+0+0
Dispose: Undefined
Iterations: 0
Compression: LZW
Orientation: TopLeft
Properties:
date:create: 2013-03-08T14:04:10+01:00
date:modify: 2013-03-08T14:04:10+01:00
signature: c8cf4265021a99e0bcc61fa45a68494344da0bd26ec974b6a67577f1f09152f5
tiff:alpha: unassociated
tiff:document: bgr_tst0010_scn0001.0101.tif
tiff:endian: lsb
tiff:photometric: RGB
tiff:rows-per-strip: 4
Artifacts:
verbose: true
Tainted: False
Filesize: 176KBB
Number pixels: 250KB
Pixels per second: 8.333MB
User time: 0.020u
Elapsed time: 0:01.030
Version: ImageMagick 6.6.9-3 2011-04-06 Q16
http://www.imagemagick.org