This version should do better (update: made more idiomatic/terse, it should really do aspect preservation to make a better image instead of translating an unknown aspect to a square)–
my $original_image = GD::Image->new( shift || die "Give an image!\n" )
my $new_image = GD::Image->new(100, 100);
0, 0, 0, 0,
The changes that make it “right” are GD::Image->trueColor(1) and $newimage->copyResampled instead of copyResized.