[Image-SIG] Placing colored pixels next to each other
lists.steve at arachnedesign.net
Mon Oct 30 19:16:10 CET 2006
> Steve Lianoglou wrote:
>> I'm using OS X so the show() function is defaulting to use
> and JPEG, I'm afraid:
> (I wonder how I missed that).
> what formats do Preview.app support? can you try setting format to
> (that writes a PPM file using an optimized code path), or perhaps
Preview.app supports pretty much any format you can throw at it ...
except for perhaps PPM(?)
I went into the Image.py file and set the format=None. Preview wasn't
showing anything here ... it was being called alright, but no image
was popping up.
I went back in there and changed the format to "PNG" and went through
my song and dance and it looks to be working just perfectly. No
artifacts around adjacent pixels.
Thanks for pointing me in the right direction with that. If there's
anything else you'd like me to test w.r.t functionality on the mac,
I'd be happy to.
Lastly, if I want to use transparency, would creating an RGBA image
be the way to go?
I'm setting the color with a 4-tuple, of which I think the last
number is the transparency (0-255?), but it seemingly has no effect
on the opacity of the area I'm coloring (or the pixel).
I'm trying to create a "heat map" over my matrix, where full opacity
would be something like "the strongest signal", and then I'd decrease
opacity/increase transparency in the blocks/pixels where the signal
Perhaps merging two images is how I should be doing it? I found this
post that seems to take this approach:
Is that the best way to do it?
More information about the Image-SIG