the site of Leo Baker…

processing images to look like halftone print

I have always liked old prints that look like they are made up of many small dots. This process / look is called halftone.
Here is an example of a black and white halftone print of an old Barbarella poster. (click on the right black and white images below to see what i’m talking about)

barbarella-posterbarbarella-posterbarbarella-poster
I made a python script that sort of replicates this look, using PIL. You can grab my halftone script here.
You can create dotted images in black and white or colour. You can have white dots on a black background, or black dots on a white background. So essentially a positive or negative method of dotting. The script gets some cool results, but it is quite slow, especially when you have a smaller dot size or larger resolution source files. As it builds a new image dot by dot, the more dots the more time it takes.

Here are some of my tests. Click on the images for full effect: please note they are obviously not from photos i have taken myself, and the sources and credits are unknown.

base marilym imagemarilyn-monroe002_dotMatrixzd
base darker image

darker image -s 5






Usage

From commandline:

python pathToLB_halftone_v1.0.py fileOrFolderToSourceFrom args

or of course, you can alias it to ‘dot’ or whatever you like.

FLAGS:
-p      Sets the divisional ammount to create the new smaller res files. The images will be divided by this number.
-t      CURRENTLY NOT IMPLEMENTED: is intended to maintain the file format of the original files -otherwise will default to jpeg.
-w      Sets the target proxy Res so that the larger dimension is 640 – which is an ideal size for email and web work.
If images are smaller than this res they will not be alterred.
-1      Sets the target proxy Res so that the lerger dimension is 1024 – for a 1k approximation.
If images are smaller than this res they will not be alterred.

FLAGS:

-s –squareSize Sets the number of pixels allocated for each dot shape. Eg: 6 = more small dots 16 = fewer larger dots

-c –colours Sets the script to colour mode.

-f –fileType Sets the filetype for new files created. Supported types are: [ "jpeg", "tiff", "gif", "png" ]

-n –negative Sets the script to negative mode (being black dots on a white background) rather than the default, (white dots on a black background).

The python script i have made produces image results very similar to half tone -I guess the only difference is the dots are displayed in line with each other rather than in a zigzag pattern.

I would love to use either this script or my pixelize script to process some of my animation, for a stylized effect. Even animate the dot size over time perhaps? I guess that could be another idea…

Further info on halftone.

One Response Subscribe to comments


  1. Sam Hodge

    Hey Leo

    Ive done some similar stuff, check it out:

    http://www.hodge.net.au/sam/blog/?p=89

    I could show you the finished work, which is a Utah Teapot 160×120cm at 160×120 pix 1 dot per centimetre.

    But I sold it and havent got around to doing a fresh canvas, but I still have the stencils

    Jan 17, 2010 @ 9:45 am

Reply

Spam Protection by WP-SpamFree