$png = $pdf->image_png($file);
As it looks, the underlying package PDF::API2::Resource::XObject::Image::PNG doesn't expect a (pre-opened) file handle, but a name of a file, which it goes to open itself.
In case the functionality is important to you, you might want to try modifying the code yourself such that the open is done only in case $file isn't already a valid file handle (check with ref).
In reply to Re^2: Write to and read from scalar
by Eliya
in thread Write to and read from scalar
by robxbl69
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |