use Imager::ExifOrientation;
sub next_photo {
my $index=int(rand($#file_list));
my $filename=$file_list[$index];
my $image = Imager::ExifOrientation->rotate(path => $filename);
scale($photo_width, $photo_height, $image);
$photo->configure(-file=>'tmp.jpg');
$filename=$file_list[($index+1)%($#file_list+1)];
$image = Imager::ExifOrientation->rotate(path => $filename);
scale($thumb_width, $thumb_height, $image);
$thumb->configure(-file=>'tmp.jpg');
$main->update();
}
A mágica tem seus limites: se o arquivo não contiver a informação de orientação, a imagem será carregada assim como está no arquivo.
AI coding: parallels with the Semiconductor Revolution
Há uma semana
Nenhum comentário:
Postar um comentário