Decomposed Art

Python script takes as an input the image file in JPEG format (ginevra.jpg, for example) and generates thumbnail image ginevra.small.jpg and two files in TkLife format:
ginevra.small.jpg.256.tklife (256 different colors, partially compatible with TkLife)
ginevra.small.jpg.64.tklife (64 different colors, fully compatible with TkLife)

You need to execute from command line. Python and PythonWare PIL libraries should be installed on your computer to get script working. is identical to script with the exception that additional TkLife file will be generated where each pixel (cell) is repeated four times (file with redundant information about image). is identical to script with the exception that ANTIALIAS option is used to process images.

$ python ginevra.jpg ginevra.small.jpg 120 140


ginevra.jpg - input file
ginevra.small.jpg - thumbnail output
120 - number of pixels in the output on X dimension
140 - number of pixels in the output on Y dimension

two additional files in TkLife format:
ginevra.small.jpg.256.tklife and ginevra.small.jpg.64.tklife
will be also generated.

Two artworks by Leonardo da Vinci (Portrait of Ginevra Benci, and The Virgin of the Rocks) and two paintings by Vincent van Gogh (Fifteen Sunflowers in a Vase, and The Starry Night) from Mark Harden's Artchive have been used as a source to generate files in TkLife format. Visualization of these files (64 different colors) using TkLife is shown below:

ginevra.jpg" - original JPEG file; ginevra.small.jpg.64.tklife - 64 color TkLife format

leonardo_virginuk_d.jpg - original JPEG file; leonardo_virginuk_d.small.jpg.64.tklife - 64 color TkLife format

sunflowers.jpg - original JPEG file; sunflowers.small.jpg.64.tklife - 64 color TkLife format

gogh.starry-night.jpg - original JPEG file; gogh.starry-night.small.jpg.64.tklife - 64 color TkLife format

Back to TkLife

email to: Alexander Kozik

last modified June 22 2005