in reply to Image errors with PDF::API2;
I was able to get it working by using GD to handle the image:
It produced a new PDF with the image placed. I did get a warning though:use GD; # ... my $imageFile = "image-24bit-interlaced.png"; my $gdimg = GD::Image->new($imageFile); my $img = $pdf->image_gd($gdimg); my $image = $page->gfx; $image->image($img, 0/mm, 100/mm);
libpng warning: Interlace handling should be turned on when using png_read_imageThis is a bug in libpng addressed in this discussion.
PS the module version you are using is very old - if you are planning to use it more you should update to the latest version. If you do you will need to update a few lines of your code also.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Image errors with PDF::API2;
by Fletch (Bishop) on Nov 16, 2021 at 21:28 UTC |