'can\'t figure out file type, specify explicitly'You need to specify the format. (Seems to be a Windows thing only.) So, I would do:
my $piddle = PDL->rpic($path, {FORMAT => 'PNG'});
which works fine for me (iff pngtopnm.exe/pnmtopng.exe are in my path).
I'm not familiar with the rim() function - afaict
my $piddle = rim($path, {FORMAT => 'PNG'});
should also work, but for me that just produces:
Can't locate object method "dim" via package "file.png" (perhaps you f
+orgot to load "file.png"?) at C:/MinGW/perl516/site/lib/PDL/IO/Pic.pm
+ line 570.
Update: the rim() function is broken in my build of PDL (version 2.4.11), and may well have been broken for quite some time.
It just calls rpic() anyway, so use that instead.
(For my test script, $path was set to file.png ... obviously.)
Cheers,
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.