开发者

Imagemagick - PDF to Jpeg/Raster texture issue

开发者 https://www.devze.com 2023-03-11 19:58 出处:网络
I am using imagemagick/php to make a jpeg file from a PDF. Input PDF file: PDF-file Output Jpeg file: Jpeg-file

I am using imagemagick/php to make a jpeg file from a PDF.

Input PDF file: PDF-file

Output Jpeg file:

Imagemagick - PDF to Jpeg/Raster texture issue

Jpeg-file

The textures on the output file look wrong near the bottom. This is the same result if I make a PNG also. I have tired different floor plans, other textures play up also in a similar way.

PHP code

$im = new Imagick();
$im->setResolution( 300, 300 ); 
$im->readImage( $input_开发者_JAVA技巧path );
$im->setImageFileName($output_path);
$im->writeImage();

Server Config

PHP Version 5.3.5
ImageMagick 6.4.8

Thank you.


It looks like ImageMaigck handles opacity in embedded images in PDFs incorrectly. I am not familiar enough with ImageMagick to have a solution for you, but it is discussed here in their documentation -- perhaps there is an option you can change to improve things.

0

精彩评论

暂无评论...
验证码 换一张
取 消