Saturday, March 25, 2017

Noise Field Redux

This time I am "seeding" an image with random black and white pixels.


I used the "L" mode, which is a standard mode for an image that has 8-bit pixels, black and white. I am choosing a black or white pixel at random with the random module:

im.putpixel((x, y), random.choice([0,255]))

The next step is to write modulation functions to modulate the noise field. I am working on a threshold function for when I make noise that is in grayscale. I am also trying to work out a pixelate function, which is proving more difficult than I thought.

The bit at the end with the saving of the image may look weird, but it allows me to save the image with its date and time as filename. For now, this makes it easier for me to work with my images. Here is an image made with the code above.

Noise field generated with Python code. A.G. (c) 2017. All Rights Reserved.

No comments:

Post a Comment