In the actual code, I still create a GD::Image so that I can read the width
No need. PDF::API2 has methods to get image size. + Using PDF::API2::image_whatever directly is safe, BTW.
use strict; use warnings; use feature 'say'; use open IO => ':raw'; use GD; use PDF::API2; my $gd_obj = GD::Image-> new( scalar qx/convert rose: png:-/ ); my $pdf = PDF::API2-> new; my $pdf_image = $pdf-> image_gd( $gd_obj ); say $pdf_image-> width; say $pdf_image-> height;
In reply to Re^3: Image modules not returning or accepting GD::Image
by Anonymous Monk
in thread Image modules not returning or accepting GD::Image
by Bod
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |