Image resize anti-aliasing?

can I turn anti-aliasing off for resizing an image? Because resizing pixel images makes it look shitty.

image(pixelImg, 50, 50, 100, 100);

I had a detailed look at the reference and didn't find anything :/



  • edited March 2014

    Function smooth() also controls anti-aliasing quality for resizing.
    For JAVA2D renderer, smooth(4); is the max. But for the others, smooth(8); or maybe more is possible! %%-

  • edited March 2014

    If JAVA2D is the default renderer then I gotz no idea what yo talking about -_- does smooth() defult on If I don't have it in my program?


    PImage img;
    void setup() {
      size(300, 300);
      img = loadImage("gun.png");
    void draw() {
      image(img, 0, 0, width, height);

    image before resize:


    image after resize:


  • Oh yeah that was my very easy problem soz I knew smooth() controlled anti-aliasing but I didn't know it was on even though I didn't have it set in my program! Good to know even if a little strange default to have!

Sign In or Register to comment.