I've been scratching out a Perl program using the Image::Magick module and have been proceeding, essentially, by finding and adapting small examples.
I'm running Perl5 on Ubuntu 18.04, and I believe my I::M module is ($image->Get('version')):
Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114
Most recently, I tried to call a SetPixels() method, only to be informed:
"Can't locate auto/Image/Magick/SetPixels.al in @INC"
My questions:
1. How, inside a Perl/.pl script, to ask Image::Magick to display its list of accessible methods?
2. How, outside of Perl scripts, to find the I::M module (or related--something about "autoloading"?) and search it for a list of public methods?
and, I guess,
3. How can I get SetPixels() in my setup?
Thank you.
[SOLVED] How to find a list of methods(?)/operations in my version of Image::Magick?
-
- Posts: 27
- Joined: 2019-09-18T08:46:14-07:00
- Authentication code: 1152
[SOLVED] How to find a list of methods(?)/operations in my version of Image::Magick?
Last edited by E. Fudd Wabbitwy on 2019-09-19T10:09:43-07:00, edited 2 times in total.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How to find a list of methods(?)/operations in my version of Image::Magick?
I do not use PerlMagick, but have you seen https://imagemagick.org/script/perl-magick.php
-
- Posts: 27
- Joined: 2019-09-18T08:46:14-07:00
- Authentication code: 1152
Re: How to find a list of methods(?)/operations in my version of Image::Magick?
Indeed, yes. It was the mention of SetPixels() on that page which inspired my attempt to use it.
And, yes, I acknowledge that that page is, itself, a listing of accessible methods. However, in my case, at least some of them remain theoretical, and my goal is to ask the installed version of Image::Magic (aka PerlMagick) what it has, or to find out for myself by finding the Perl module (.pm file) and reading for myself.
Thanks!
And, yes, I acknowledge that that page is, itself, a listing of accessible methods. However, in my case, at least some of them remain theoretical, and my goal is to ask the installed version of Image::Magic (aka PerlMagick) what it has, or to find out for myself by finding the Perl module (.pm file) and reading for myself.
Thanks!
-
- Posts: 27
- Joined: 2019-09-18T08:46:14-07:00
- Authentication code: 1152
Re: I How to find a list of methods(?)/operations in my version of Image::Magick?
My goal was to try to find out WHAT methods were available. In particular, I discovered that "setpixels" (plural) is not available in my setup, leading me to trying to install the latest version from source.
This works:
This works:
Code: Select all
use Class::Inspector;
use Image::Magick;
my $arrayref=Class::Inspector->methods('Image::Magick','full','public');
for (my $i=1;$i<=$#{$arrayref};$i++) {
print $#{$arrayref};
print "$arrayref->[$i]\n";
}
exit;