Page 1 of 1

Using Filters for resizing?

Posted: 2018-01-22T10:49:08-07:00
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

Re: Using Filters for resizing?

Posted: 2018-01-22T11:08:32-07:00
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>"; 
} 

Re: Using Filters for resizing?

Posted: 2018-01-22T11:47:35-07:00
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/