Python script Image2TkLife_003.py 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 Image2TkLife_003.py from command line.
Python and
PythonWare PIL libraries
should be installed on your computer to get script working.
Image2TkLife_003X2.py is identical to Image2TkLife_003.py
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).
Image2TkLife_004.py is identical to Image2TkLife_003.py
script with the exception that ANTIALIAS option is used to process images.
$ python Image2TkLife_003.py ginevra.jpg ginevra.small.jpg 120 140
where:
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 http://www.artchive.com/
have been used as a source to generate files in TkLife format.
Visualization of these files (64 different colors) using TkLife is shown below:
email to: akozik@atgc.org Alexander Kozik
last modified June 22 2005