use strict; use List::Util qw( max ); use Imager; use Imager::Font::Wrap; use utf8; my $photo_file = "360621461_117a18148c.jpg"; my $message = "ここは あおやま。 とうきょうの つぼ\nだという うわさのある こうえん。"; # キャンバスとなるオブジェクト my $canvas = new Imager( xsize => 450, ysize => 370 ); # 写真の読み込み my $photo = new Imager; $photo->read(file => $photo_file) or die $photo->errstr; # Maxでリサイズ my $rate = max( $canvas->getwidth / $phot