Sorry if it's a FAQ, I haven't found it mentioned anywhere:
Command-line ImageMagick tools support the "-define jpeg:size={width}x{height}" option to tell the libjpeg library to downscale the image while opening it (thus saving memory and processing power).
Is there a similar option in PerlMagick? How is it spelled?
Thanks!
"-define jpeg:size={width}x{height}" in PerlMagick?
Re: "-define jpeg:size={width}x{height}" in PerlMagick?
Use $image->Set() to emulate the -define command line option:
- $image->Set('jpeg:size'=>'200x200');
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: "-define jpeg:size={width}x{height}" in PerlMagick?
That does not seem right. -set is used to set a Properity -define is used to set a global artefact.
However -set can set an artefact by pre-pending option: to the setting.
As such wouldn't the correct method be????
also watch out for percents, as setr probably expands percent escapes, where define does not.
Please clarify, as the terms seem confused.
PS: I do know that $image->Set('verbose'=>'true');
Does turn on the verbose artefact! whcih at the time I also though was a little odd.
If the perl Set() function is really the equivalent for -define, then what is the equivalent for -set???
However -set can set an artefact by pre-pending option: to the setting.
As such wouldn't the correct method be????
Code: Select all
$image->Set('option:jpeg:size'=>'200x200');
Please clarify, as the terms seem confused.
PS: I do know that $image->Set('verbose'=>'true');
Does turn on the verbose artefact! whcih at the time I also though was a little odd.
If the perl Set() function is really the equivalent for -define, then what is the equivalent for -set???
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/