I am trying to resize some images. While doing it, in some cases, antialiasing seems like not working.
so for example, I have a 1600x1200 photo as original image (
http://imgur.com/WpfEyzH). And I am using this simple code:
PImage pimg;
public void setup()
{
size(1600, 1200);
as you can see, there some distortions on the resulting image file
my question is that is there a way to totally making the image clear like this here :
http://imgur.com/KPAyFDI ? This photo is created by a python library
http://www.pythonware.com/products/pil/, so is it possible to have the same result with processing libraries?
I have been checking some code for a project of mine and saw something interesting in PApplet and PGraphics classes related with smooth() methods
Below is the piece of code from PAppplet.java
public void smooth() {
if (recorder != null) recorder.smooth();
g.smooth();
}
public void smooth(int level) {
if (recorder != null) recorder.smooth(level);
g.smooth(level);
}
Here both g and recorder objects are instances of PGraphics.java class and in that class, here are the smooth methods:
public void smooth() {
smooth = true;
}
/**
*
* @param level either 2, 4, or 8
*/
public void smooth(int level) {
smooth = true;
}
Basically, setting different levels of smooth does not seem to be working. I have tried to put different numbers like 32 64 8 and so on but result didnt change at all. and as you can check the api page on
http://processing.org/reference/smooth_.html it says smoothing levels should be working, but simply it is does not.
can anyone explain why the pieces of code above dont do anything with the levels although it is written in the API?