# 512x512 ~ 7s
my $tile = $tileset->tile($_);
- $img->setscanline(
- x => $x*4, y => $y*4 + $_, pixels => pack('(CCCx)*',
- map { @$_ } @{ $tile->{subcol} }[$_*4 .. $_*4 + 3]
- ),
- ) for 0..3;
+ $img->paste(src => $tile->{sprite}, left => $x*4, top => $y*4);
# 4096x4096 ~ 75s
# my $tile = $tileset->sprite($tileset->{map}->[$_]);