Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Imager::GIF seems broken

by Anonymous Monk
on Jan 05, 2020 at 15:44 UTC ( [id://11110985]=note: print w/replies, xml ) Need Help??


in reply to Re: Imager::GIF seems broken
in thread Imager::GIF seems broken

Thank you vr! The module works as expected when following your instructions. Apparently the documentation synopsis contains two severe errors.

Imager::GIF synopsis:

my $sonic = Imager::GIF->new(file => 'sonic.gif');
Should be:
my $sonic = Imager::GIF->read(file => 'sonic.gif');
Imager::GIF synopsis:
$small_sonic->write(file => 'small_sonic.gif');
Should be:
$small_sonic->write('small_sonic.gif');
The first problem, not using the read method to construct the object, was causing the write error. The second issue, supplying a hash instead of file name to write method, silently fails to do anything.

Kudos

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11110985]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-07-22 07:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.