This is the code I'm using:
Code: Select all
#!/usr/bin/perl
use Image::Magick;
my $image = Image::Magick->new;
my $new_image = Image::Magick->new;
$image->Read("$ARGV[0]");
my ($my_w, $my_h) = $image->Get('columns', 'rows');
my $new_h = $my_h*16;
$new_image->Set(size=>"${my_w}x${new_h}");
$new_image->Read("xc:none"); # none=transparent
foreach my $i (0..15) {
my $rot_image = Image::Magick->new;
$rot_image->Set(size=>"${my_w}x${my_h}");
$rot_image->Read("xc:none");
# fixme, need a way to control the background area:
$rot_image->Composite(
image=>$image,
rotate=>22.5*$i);
$new_image->Composite(image=>$rot_image,y=>($my_h*$i));
undef $rot_image;
}
my $x = $new_image->Write("$ARGV[1]");
warn "Write failed: $x" if "$x";
I tried setting png:OutsideOverlay to false, but got nothing out of that either.
Clearly I need help. I would have included an image, but so far I don't see how to do that.
On request I'll upload the image to a sharing site.