[Image-SIG] Placing colored pixels next to each other
Steve Lianoglou
lists.steve at arachnedesign.net
Mon Oct 30 16:00:04 CET 2006
Hi folks,
I'm quite new with PIL and I'm trying to do something simple but I'm
having a hard time getting this to work the way I want.
What I want to do is place two different colored pixels next to each
other w/o one trampling over the other. I'm not quite sure what's
happening, or what to call it, maybe antialiasing, but lets say I
want to place a green pixel at 0,0.
Just setting one pixel to red doesn't make a red pixel at all, it's
rather grey. If I make a box (say 5x5) it's a bit better, but the
color isn't confined to the 3x3 box anymore .. there's a "splatter"
of coloring (of lower intensity) in the neighborhood of my red box.
That's probably desirable in most cases, but I'm looking for exact
color hits ... eventually what I'd like is to have red and green
pixels next to each other w/o them interfering with their neighbors.
I'm trying to visualize a 6000x200 matrix (in this case a microarray)
where each pixel would represent an index of the matrix .. the
different colors in each pixel would represent something else.
Even if I make the image 18000x600 to do 3x3 pixels for each "index",
the red and greens still fight with eachother and I get a nice grey
smudge for an image.
Is there another approach I should be taking, or a setting I can turn
off so this doesn't happen?
Oh ... I'm using recently checked out svn version of PIL (thanks for
the numpy integration, btw) and am setting the mode of the image to
be RGB and RGBA (I'd like transparency to, eventually), for the record.
Lastly, I apologize if I'm missing something obvious, looked through
the docs located at http://www.pythonware.com/library/pil/handbook/
index.htm but can't seem to make sense of it for what I need to do.
Thanks,
-steve
More information about the Image-SIG
mailing list