Increase image size without interpolation

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
daviddoria

Increase image size without interpolation

Post by daviddoria »

Does anyone know how to turn off interpolation (resulting in each pixel simply being copied around itself multiple times)?

If I do this

Code: Select all

convert -resize 5000% Small.jpg Big.jpg
it uses some default interpolation. I can specify an interpolation like this:

Code: Select all

convert -resize 5000% -interpolate Average Small.jpg Big.jpg
But there is no option for "none". Anyone know an argument to do this?

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

Re: Increase image size without interpolation

Post by fmw42 »

convert small.jpg -scale 5000% big.jpg

This just replicates pixels when enlarging.

see
http://www.imagemagick.org/script/comma ... .php#scale
http://www.imagemagick.org/Usage/resize/#scale
daviddoria

Re: Increase image size without interpolation

Post by daviddoria »

Fantastic, thanks!
Post Reply