Backstory: I am approaching ImageMagick, as I gather a number of others' have, via something of a backdoor, insofar as I am a Perl user of some years and have the habit of using Perl modules (.PM) to access advanced functionality about which I don't want to face details.
So far my experience with PerlMagick, Image::Magick, suggests to me that it was created with the assumption that its users would already have enough knowledge about either programming in ImageMagick or operating its command-line, that it would be obvious to them how to resolve differences in PerlMagick and ImageMagick syntax which arise.
For users like myself, neither the format of parameter "strings" nor whether parameters listed are critical or optional is obvious.
As I've considered how PerlMagick "must" have been written, I surmise that it must be "translating" between "PerlMagick method names and parameters" (such as those presented here) and the method names and parameters used by historical ImageMagick--because they are different.
Ideally, there is a way to see how PerlMagick methods and parameters map onto ImageMagick's.
I suppose how they are translated could be "un-inspectable", but I'm asking if an API developer might comment on the "map" concept and possibly suggest where to hunt for it in the source code, or how to generate it. ("Surely, it's in the source code prior to installation.")
Guidance from the/any PerlMagick developer would be especially helpful to people like myself who know Perl but are tripping, mightily, over syntactical differences.
Thank you.
Question about PerlMagick API [how is the mapping done?]
-
- Posts: 27
- Joined: 2019-09-18T08:46:14-07:00
- Authentication code: 1152
-
- Posts: 27
- Joined: 2019-09-18T08:46:14-07:00
- Authentication code: 1152
Re: Question about PerlMagick API [how is the mapping done?]
(As I was writing that, I had already forgotten that @snibgo had suggested in another thread to hunt for the mappings in the .XS files.
Indeed, as I found examples/prototypes? of PerlMagick methods in "quantum.xs", I also remembered that I had been there before, and that, for example, learning that "blend" takes a "StringReference" does not fully answer the question of what the format of the string should be.
When I saw it again, just now, it occurred to me, again, that that information may not be in the source code anywhere at all, if the developer assumed that users would know it's 'mm/nn/oo' where mm, nn, and oo are all numbers (floats?) between 0-100, representing percentages of RGB. My head hurts.)
Indeed, as I found examples/prototypes? of PerlMagick methods in "quantum.xs", I also remembered that I had been there before, and that, for example, learning that "blend" takes a "StringReference" does not fully answer the question of what the format of the string should be.
When I saw it again, just now, it occurred to me, again, that that information may not be in the source code anywhere at all, if the developer assumed that users would know it's 'mm/nn/oo' where mm, nn, and oo are all numbers (floats?) between 0-100, representing percentages of RGB. My head hurts.)