Using Filters for resizing?

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?".
Post Reply
blackangel1711
Posts: 1
Joined: 2018-01-22T10:47:00-07:00
Authentication code: 1152

Using Filters for resizing?

Post by blackangel1711 »

Hey everyone

Newb here.

Been experimenting with IM for some image resizing that I need to do.

My input image is 4096x4096 that I am resizing to 1024x1024 and I would like to experiment with different filters to see what results I get.

I am doing two conversions to do a comparison of the results
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Using Filters for resizing?

Post by Bonzo »

What is your question?

Below some old php code of mine that will resize using all the available filters. Otherwise you could probably speed up your process by only reading in the image once and then saving the two results.

Code: Select all

// Build the array of filters to be used 
exec("convert -list filter", $IMarray, $code); 
// Start the loop to resize with the different filters 
foreach ($IMarray as $value) { 
$new_name = $value."_resize.png"; 
exec ("convert fungi.png -filter $value -resize 300x300 -bordercolor black -border 1x1 $new_name"); 
echo "<tr><td><img src=\"".$new_name."\"width=\"302\" height=\"268\"></td>"; 
echo "<td>$value</td></tr>"; 
} 
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Using Filters for resizing?

Post by fmw42 »

See

https://www.imagemagick.org/Usage/filter/
https://www.imagemagick.org/Usage/filter/nicolas/

Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line and if possible your images.

See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620

For novices, see

http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
Post Reply