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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.