ajpegtran - Transform an Animated JPEG (AJPEG) in various ways
ajpegtran [options] <input-file> [output-file]
This script relies on jpegtran, so make sure its available and working, on Debian/Ubuntu that would be by having libjpeg installed.
This is the meat of this script: crop each frame in an animated JPEG and keep only the stated part of the frame. For example, --left will split a frame into two equal parts and keep the left one.
Appends "-crop" to input file's basename.
Splits the canvas vertically into three equal parts and keeps the middle one.
Keeps are more left-ish, right-ish part of the animation.
Flag. Tells ajpegtran to adjust the file modification timestamp (mtime) of the output-file to be the same as the mtime of the input-file.
Flag. Force overwriting of an existing output file.
Flag. Switch debug output on.
$ ajpegtran --keep-mtime input.ajpeg output.gif
When the output file is omitted, ajpegtran will write to a file with the suffix .gif and the input file's basename:
More information about how an Animated JPEG differs from animated GIF files can be found in the documentation of the backend module Image::Animated::JPEG and the official AJPEG specs bundled with this distribution.
Clipland GmbH http://www.clipland.com/
Copyright 2012-2017 Clipland GmbH. All rights reserved.
This library is free software, dual-licensed under GPLv3/AL2. You can redistribute it and/or modify it under the same terms as Perl itself.
To install Image::Animated::JPEG, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Image::Animated::JPEG
CPAN shell
perl -MCPAN -e shell install Image::Animated::JPEG
For more information on module installation, please visit the detailed CPAN module installation guide.