my $resized = GD::Image->new($small_w || 1, $small_h || 1);