Crop to 16:9 and zoom with maximal quality

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
mrmattnc
Posts: 22
Joined: 2014-02-04T11:23:37-07:00
Authentication code: 6789

Re: Crop to 16:9 and zoom with maximal quality

Post by mrmattnc »

fmw42 wrote:If speed is more important than quality, then add -filter point and use viewport cropping. You can do fx calculations in the viewport crop

convert in.png -background somecolor -virtual-pixel background -define distort:viewport=WxH+X+Y -filter point -distort SRT scale,0 out.png

see
http://www.imagemagick.org/Usage/distor ... t_viewport
http://www.imagemagick.org/Usage/distorts/#lookup
http://www.imagemagick.org/Usage/distor ... red_square

Just to be thorough, it doesn't look like -filter is an image attribute but a subroutine to run on an image. How would you implement this in PerlMagick?

User avatar
fmw42
Posts: 26280
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Crop to 16:9 and zoom with maximal quality

Post by fmw42 »

Sorry I do not know PerlMagick.

Post Reply