Hey, ich arbeite seit längerem erfolgreich mit der PIL - Bibliothek und Python 2.4.2. Kann mir einer sagen , wie ich mehrere kleine Thumbnail- Images zu einem Image machen (zusammen kopieren ) kann, das ich dann wieder speichern kann ? Vielen Dank J. Sasse
Am 12.12.2006 um 21:58 schrieb Joachim Sasse:
Hey,
ich arbeite seit längerem erfolgreich mit der PIL - Bibliothek und Python 2.4.2.
Kann mir einer sagen , wie ich mehrere kleine Thumbnail- Images zu einem Image machen (zusammen kopieren ) kann, das ich dann wieder speichern kann ?
import Image im = Image.open('small_hawai.jpeg') (x,y) = im.size new = Image.new('RGB', (x*2,y*2)) new.paste(im, (0,0,x,y)) new.paste(im, (x,y,2*x,2*y)) # ... more pasting new.save('test.jpg') Also Endgröße ausrechnen, neues Bild in dieser Größe ausrechnen, dann die Bilder da reinpacken. HTH, __Janko -- Janko Hauser email: jhauser@zscout.de
participants (2)
-
Janko Hauser
-
steffi.sasse@t-online.de