arnoldbird
arnoldbird

Reputation: 954

How to use setImageScene method for Imagick?

I'm converting PDFs to JPEGs and I can't get setImageScene to work.

I've tried calling it before readImage and after readImage. It has no effect on the numbering of the files.

Can someone provide a working example?

Thanks

Upvotes: 0

Views: 48

Answers (1)

Danack
Danack

Reputation: 25701

It doesn't look setImageScene works. It's really easy to number files yourself though.

$imagick = new Imagick("./LayerTest.psd");

$pageNumber = 200;
foreach ($imagick as $subImage) {
    $filename = "./output_$pageNumber.png";
    $subImage->setImageFormat('png');
    $subImage->writeImage($filename);
    $pageNumber++;
}

Upvotes: 2

Related Questions