[Image-SIG] Placing colored pixels next to each other
Steve Lianoglou
lists.steve at arachnedesign.net
Mon Oct 30 17:01:21 CET 2006
Hi Fredrik,
>> 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.
>
> how are you setting the pixels, and what are you doing to view the
> result ?
I tried a couple of ways -- though I thought the best way for some
quick testing would be to use what was suggested in tutorial,
something like:
------
image = Image.new("RGBA", (200,6000))
pix = image.load()
pix[10,10] = (204,0,0) # red -- or (204,0,0,255) if using RGBA (is
that the right way, btw?)
image.show()
------
>
>> 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.
>
> 6000x200? are you sure the artifacts you're seeing isn't caused by
> whatever program you're using to display the image? or do you really
> have a 6000-pixel wide screen?
Ah ... yeah .. I mean, doesn't everybody these days? :-)
Sorry, I'm used to indices being referenced by row,col -- so it's
actually 200 pixels wide by 6000 tall.
I'm using OS X so the show() function is defaulting to use Preview.app.
The image is certainly much taller than my monitor but not wider (my
resolution is only 1440x900 pixels), so it starts off to be zoomed
out, but I zoom enough to make the original pixels large enough to
look at.
I've actually been playing around with much smaller sized images
(30x30) to try some things out before I took a whack at the "real
deal" 6000 row microarray, so like in the example above I'd actually
have (30,30) instead of (200,6000)
Thanks,
-steve
More information about the Image-SIG
mailing list