dwm042 has asked for the wisdom of the Perl Monks concerning the following question:
After a while I got interested in doing the same things in Perl, because typing 'convert blah blah' all the time was getting old, and code reuse was becoming more and more a factor.#! /bin/bash convert -size 100x100 -stroke SeaGreen -fill palegreen -strokewidth 2 +\ xc:white -draw 'translate 50,50 circle 0,0,25,0' /share/circle_script. +jpg
I have this problem with the default IM packages in both Ubuntu 10.04 and Ubuntu 11.04. But if I switch to Graphics::Magick, it just works. Thing is, I don't see Graphics::Magick in CPAN and after having authored one whole CPAN module, I'm growing a little fond of that way of "publishing" code. But some questions, I think, are worth asking at this point, before pushing too far up the possible CPAN path.#! /usr/bin/perl use warnings; use strict; use Image::Magick; my $p = Image::Magick->new; $p->Set( size => '100x100'); $p->Read("xc:white"); $p->Draw( primitive => 'circle' ,translate => "50,50", stroke => 'SeaGreen', strokewidth => 2, fill => 'palegreen', points => '0,0,25,0' ); $p->Write("/share/circle_perl.jpg");
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Are objects derived from Graphics::Magick CPAN-okay?
by Tanktalus (Canon) on Jul 28, 2011 at 04:06 UTC | |
Re: Are objects derived from Graphics::Magick CPAN-okay?
by Khen1950fx (Canon) on Jul 28, 2011 at 04:45 UTC |