We introduce Weighted Finite Automata (WFA) as a tool to define real f
unctions, in particular, greyness functions of grey-tone images. Mathe
matical properties and the definition power of WFA have been studied b
y Culik and Karhumaki. Their generative power is incomparable with Bar
nsley's iterative Function Systems. Here, we give an automatic encodin
g algorithm that converts an arbitrary grey-tone-image (a digitized ph
otograph) into a WFA that can regenerate it (with or without informati
on loss). The WFA seems to be the first image definition tool with suc
h a relatively simple encoding algorithm.