From: William H. <wh...@gm...> - 2006-09-19 17:55:50
|
On 9/19/06, Simon Burton <sb...@ew...> wrote: > On Tue, 19 Sep 2006 12:42:09 -0400 > Alan G Isaac <ai...@am...> wrote: > > > I was hoping not to go via EPS. > > E.g., can a PyX "bitmap" image be readily turned into a PIL image? > > (I do not know PIL.) > > Huh ? I thought pyx ONLY produced EPS. What is this bitmap you are talkin= g about ? Maybe he has been making bitmaps "by hand" using bitmap.image(....) In which case, I think the answer might be to use PIL's Image.fromstring() function. Something like (untested): import Image im =3D Image.fromstring('L', (nx, ny), datastring) im.save("image.jpg") Cheers Will --=20 Dr William Henney, Centro de Radioastronom=EDa y Astrof=EDsica, Universidad Nacional Aut=F3noma de M=E9xico, Campus Morelia |