I think it's hard not to admit that Image::Magick documentation simply sucks. IMHO it's a wonderful module, I simply hate the docs.
One thing that I've been eager to do for a long time has been getting image data in memory instead of writing them to a file. I tried in-memory filehandles, but with no luck. There's always been an interesting ImageToBlob method, but it was a bit short-ranged... at least I believed. Reading the docs, it seemed that it was able to spit data out only in the original format... whatever it means for some dynamically generated image.
Today I had the pleasure to discover that this isn't actually the case. You can use that method to get image data in memory and in any format you want... just pass the magick parameter with the indication of the format:
my $png_data = $image->ImageToBlob(magick => 'png');
I wish I knew this a long time ago.
The docs are open source too, you know (Score:1)
So where's your patch which enables future users to share in your new-found knowledge without having to dig through google and blog-entries? Sometimes one doesn't have the time or energy to "give back", but surely the time spent writing this post would have been better spent creating such a patch?
Sorry, don't mean to be too hard on you, but it always rankles when someone complains about a problem in a piece of OS software which they clearly know how to fix but instead of fixing it they write up their compla
Re: (Score:1)
perldoc Image::Magickyou'll get a couple of screens that redirect you towards the online docs [imagemagick.org]. Figuring out how to "send a patch" for those docs goes well beyond the effort of writing a post here. Call it lazynessThere's more, in my opinion. The fact itself of calling such a parameter "magick" is questionable, because it doesn't make it immediately clear what