Imagick PHP image set question

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
JohnSmith
Posts: 11
Joined: 2012-10-01T16:41:10-07:00
Authentication code: 67789

Imagick PHP image set question

Post by JohnSmith »

I read pdf file and go get set of images ($img_set) with 6 images in it.
Each property i supply is going towards particular image in set not entire set.
$img_set = new Imagick();
$img_set = readImage("test.pdf");
$img_set->setImageUnits(1);
echo "<br> First: ".$img_set->getImageUnits(); //1
$img_set->setIteratorIndex(3);
echo "<br> Third: ".$img_set->getImageUnits(); //0
Outputs:
First: 1
Third: 0


So if i want to resize vector graphics how do i do it? i know only option is to change dpi so i do
$img_set = new Imagick();
$img_set->setResolution(200,200);
$img_set = readImage("test.pdf");
echo "<br> ".$img_set->getImageWidth(); //1200
$img_set->setIteratorIndex(3);
echo "<br> ".$img_set->getImageUnits(); //600
Outputs:
First: 1200
Third: 600


How do i set higher resolution for any other image in set?
Post Reply