Page 1 of 1

Set TIFF Tag ExtraSamples

Posted: 2010-06-17T03:42:01-07:00
by btam
I'm trying to create a tiff format from png using PHP Imagick class.
The png file contains a transparent background.

$image = "testing.png";
$im = new Imagick();
$im->readImage( $image );
$im->setImageFormat('tiff');

Is there any method I can set the Tag ExtraSamples to EXTRASAMPLE_ASSOCALPHA = 1???

Re: Set TIFF Tag ExtraSamples

Posted: 2010-06-17T04:47:01-07:00
by magick
See http://www.imagemagick.org/script/formats.php for the TIFF tag. Look for the tiff:alpha define.

Re: Set TIFF Tag ExtraSamples

Posted: 2010-06-17T06:18:43-07:00
by btam
I have tried:
$im->setImageFormat('tiff:alpha=unassociated');
but it doesn't work :(

Re: Set TIFF Tag ExtraSamples

Posted: 2010-06-17T08:57:23-07:00
by magick
tiff:alpha is a define or option, not a format.

Re: Set TIFF Tag ExtraSamples

Posted: 2010-06-28T12:23:41-07:00
by btam
I've tried the following:
convert -define tiff:alpha=associated image.tif associated.tif


It works in version 6.6.2 but DOES NOT work in 6.2.8.

Do you know which version is the min to set this option?

Re: Set TIFF Tag ExtraSamples

Posted: 2010-06-28T12:39:16-07:00
by fmw42
see http://www.imagemagick.org/Usage/formats/#tiff

but it does not identify that change.