Reputation: 1561
I am trying to resize and pad some images, without anti-aliasing:
convert test.bmp -resize 200x200 -background white -gravity center -extent 200x200 -monochrome
but I get anti-aliasing (grey pixels), I have tried adding +antialias but it doesn't seem to work.
Should this work?
Mick
Amended after trying with scale.
Here is the image after
convert cp10.bmp -scale 200x200 -background white -gravity center -extent 200x200 test.bmp
Upvotes: 3
Views: 1253
Reputation: 19675
By default, -resize
will use a Mitchell or Lanczos filter for the resizing, depending on the image. Those work well for most images, but if you don't want their smoothing effect (say, if you're scaling pixel art), try -scale
instead of -resize
, or choose a different filter (scale uses -filter box
).
As an example, here is pattern:checkerboard
:
With -resize 64x64
:
With -scale 64x64
:
Upvotes: 5