Set TIFF Tag ExtraSamples

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
btam

Set TIFF Tag ExtraSamples

Post 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???
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Set TIFF Tag ExtraSamples

Post by magick »

See http://www.imagemagick.org/script/formats.php for the TIFF tag. Look for the tiff:alpha define.
btam

Re: Set TIFF Tag ExtraSamples

Post by btam »

I have tried:
$im->setImageFormat('tiff:alpha=unassociated');
but it doesn't work :(
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Set TIFF Tag ExtraSamples

Post by magick »

tiff:alpha is a define or option, not a format.
btam

Re: Set TIFF Tag ExtraSamples

Post 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?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Set TIFF Tag ExtraSamples

Post by fmw42 »

see http://www.imagemagick.org/Usage/formats/#tiff

but it does not identify that change.
Post Reply