-   Programming (
-   -   Python: Bit masking images? (

sienarot 03-06-2004 01:41 PM

Python: Bit masking images?
I was wondering if anyone can help me out here...

I have two images. image1.png and image2.png:
- image1.png is basically a regular picture of no significant importance
- image2.png however is an image file of the same size, mode, and format as the first, except that rather than it being a picture, I'm using the image for bit masking. Various pixels are just random decimal numbers denoting series of 1's and 0's which I'd like to mask with the image.

Is there a simple way of using a bitwise AND on the two images? As well, what about OR?

I'm using the Python Imaging Library to do some of these operations, but I'm not sure if any of the merge, compose, blend functions do this and if so, what operations they perform.

Any suggestions?

sienarot 03-06-2004 02:46 PM

Nevermind. I ended up writing up my own routine ;)

All times are GMT -5. The time now is 05:18 PM.