Thank you for your reply, it was the same as my superviser suggested :) I have no idea how to get rid of it, yet. Here is the code for the rotate. To get the 'step edge' images correct, I have to rotate a larger image and then crop it to the right size.
sub rotate {
my ($img, $path) = @_;
my @degrees = qw(45 90 135 180 225 270 315);
my $cropped_orig = crop_image($img);
my %images = (0 => $cropped_orig);
foreach (@degrees) {
my $image = GD::Image->new(CANVAS, CANVAS);
$image->copyRotated($img, 32, 32, 1, 1, 64, 64, $_);
$image = crop_image($image);
$images{$_} = $image;
}
return \%images;
}
|