Enlarge with good results

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
strgg
Posts: 16
Joined: 2012-04-30T18:42:58-07:00
Authentication code: 13

Enlarge with good results

Post by strgg »

Good day everyone

I try to enlarge a picture like this:

Code: Select all

$width = $width * 4;
$height = $height * 4;
exec("convert src_images/monkeys.png -adaptive-resize ".$width."x".$height."  resized_adaptive.png");
exec("convert src_images/monkeys.png -resize ".$width."x".$height."  resized.png");
The results from those 2 commands look like the same unlike written http://www.imagemagick.org/Usage/resize ... ive-resize.

Originalimage:
http://www.flickr.com/photos/floridapfe ... hotostream

Resized with a online service which results in very good quality. http://www.pixer.us
Image

Resized with imagemagick
Image
if you go eg in the left down corner you can see that the picture consists out of 60 x 60 pixel sized quadres.

Which different way would you suggest without increasing processing power compared to the initial given commands?
Thanks !
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Enlarge with good results

Post by anthony »

-adaptive-resize can be simulated using

Code: Select all

-filter point -interpolate ???? -distort Resize
-adaptive resize was meant to only use 'mesh interpolation', but whether it uses "Mesh' or the current -interpolate setting, depends on your exact version of IM.

Try setting -interpolate nearest-neighbor before using -adaptive-resize to test if it is dependant or not.

I hope to resolve this this-or-that situation in IMv7 by adding -interpolative-resize Though this operation may be rolled into a more general -resize-special {method} for the myriad of special purpose resizes that currently exist. (that change will be in late beta testing)
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply