Got it working; need to figure out CPAN build of Image::Magick
This commit is contained in:
parent
bfca681ee5
commit
d0b352492e
10
README.md
10
README.md
@ -4,3 +4,13 @@ Various experiments to convert image files to avif
|
|||||||
|
|
||||||
## Debian dependencies
|
## Debian dependencies
|
||||||
|
|
||||||
|
- libmagickcore-6-headers: /usr/include/ImageMagick-6/magick/MagickCore.h
|
||||||
|
|
||||||
|
## Running it
|
||||||
|
|
||||||
|
./image_magick/to_avif.pl images/me.png >> me.avif
|
||||||
|
|
||||||
|
## TODOs
|
||||||
|
|
||||||
|
- Debian build from CPAN fails, can't find MagickCore.h
|
||||||
|
- Install `libimage-magick-perl` for now
|
||||||
|
18
image_magick/to_avif.pl
Normal file → Executable file
18
image_magick/to_avif.pl
Normal file → Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/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);
|
||||||
|
|
||||||
|
# Write to STDOUT instead of file
|
||||||
|
binmode STDOUT;
|
||||||
|
$p->Write('avif:-');
|
BIN
images/me.png
Normal file
BIN
images/me.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 254 KiB |
Loading…
x
Reference in New Issue
Block a user