We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Raw Pixels (Read 508 times)
Raw Pixels
Oct 21st, 2007, 5:57am
 
I like pixels... I'm a passionate for bit squares, and i specialy don't like any kind of smoth of anti-aliasing.

However i have a problem. I'm having dirty pixels.

http://img.photobucket.com/albums/v298/Decinoge/clean.png
[edit][Please notice the grey pixels on the NOT CLEAN area. only white and black are used.]

I'm doin a PGraphics, and i "generate" an image there, using simple primitives.
However i have to do a scale() before i actualy paint the graphic on the screen with an image() function. That scale is what leads to my problem, because its that usefull function that is making the dirty pixels.

I could _try_ to do the image on the right scale already, in a way it wouldn't need the scale itself. But that would involve some annoying recoding, not as annoying as the dirty pixels themselfs.

My question is, is there a way for the scale() to do a simple Nearest Neighbor scale?

Also, is there a way to do that kind of scale on the whole screen (to make resizeble windows, without anti-aliasing)?

I'm using OPENGL rendering (thru the size()), but the PGraphics are done in P3D. This are not "verry" important matters, but they still annoy me very much. Specialy because Processing is a good tool to work with raw pixels, but still have this problems with images (with primitives work just wonderfully).
Page Index Toggle Pages: 1