App-ImageMagickUtils

 view release on metacpan or  search on metacpan

script/downsize-image  view on Meta::CPAN


Shortcut for --downsize-to=2048.

See C<--downsize-to>.

=item B<--delete-original>, B<-D>

Delete (unlink) the original file after downsizing.

See also the C<trash_original> option.


=item B<--dont-downsize>

Alias for --downsize-to ''.

See C<--downsize-to>.

=item B<--downsize-to>=I<s>

Default value:

 1024

Valid values:

 ["",640,800,1024,1536,2048]

Downsizing will only be done if the input image's shortest side is indeed larger
then the target downsize.

To disable downsizing, set C<--downsize-to> to '' (empty string), or specify on
C<--dont-downsize> on the CLI.


=item B<--file>=I<s@>*

(No description)


Can also be specified as the 1st command-line argument and onwards.

Can be specified multiple times.

=item B<--files-json>=I<s>

See C<--file>.

Can also be specified as the 1st command-line argument and onwards.

=item B<--no-downsize>

Alias for --downsize-to ''.

See C<--downsize-to>.

=item B<--no-skip-downsized>

Do not skip previously downsized images.

By default, when given a filename that looks like it's already downsized, e.g.
C<foo.1024-q40.jpg> or C<foo.q40.jpg>, will skip downsizing. The
C<--no-skip-downsized> option will process such filenames nevertheless.


=item B<--no-skip-whatsapp>

Do not skip WhatsApp images.

By default, assuming that WhatsApp already compresses images, when given a
filename that matches a WhatsApp image filename, e.g. C<IMG-20220508-WA0001.jpg>
(will be checked using L<Regexp::Pattern::Filename::Type::Image::WhatsApp>),
will skip downsizing. The C<--no-skip-whatsapp> option will process such
filenames nevertheless.


=item B<--quality>=I<s>, B<-q>

Quality setting (for JPEG/PNG), 1 (best compression, worst quality) to 100 (least compression, best quality).

Default value:

 40

=item B<--trash-original>, B<-T>

Trash the original file after downsizing.

This option uses the L<File::Trash::FreeDesktop> module to do the trashing.
Compared to deletion, with this option you can still restore the trashed
original files from the Trash directory.

See also the C<delete_original> option.


=item B<-S>

Alias for --downsize-to ''.

See C<--downsize-to>.

=back

=head2 Configuration options

=over

=item B<--config-path>=I<s>, B<-c>

Set path to configuration file.

Can actually be specified multiple times to instruct application to read from
multiple configuration files (and merge them).


=item B<--config-profile>=I<s>, B<-P>

Set configuration profile to use.

A single configuration file can contain profiles, i.e. alternative sets of
values that can be selected. For example:



( run in 0.732 second using v1.01-cache-2.11-cpan-39bf76dae61 )