25 lines
460 B
Perl
25 lines
460 B
Perl
|
#!/usr/bin/env perl
|
||
|
|
||
|
use v5.36;
|
||
|
use Image::Magick;
|
||
|
|
||
|
unless ($ARGV[0]) {
|
||
|
say "give me image file, e.g.: $0 goatse.jpeg";
|
||
|
exit 64;
|
||
|
}
|
||
|
|
||
|
my $p = Image::Magick->new;
|
||
|
my $file = $ARGV[0];
|
||
|
|
||
|
$p->Read($file);
|
||
|
|
||
|
my $image_avif = $p->Clone;
|
||
|
$image_avif = $image_avif->ImageToBlob(magick => 'avif');
|
||
|
|
||
|
my $preview_avif = $p->Clone;
|
||
|
$preview_avif->Zoom('25%');
|
||
|
$preview_avif = $preview_avif->ImageToBlob(magick => 'avif');
|
||
|
|
||
|
#print $image_avif;
|
||
|
print $preview_avif;
|