Sorry, reply to all is not the default in gmail.

-Chris

---------- Forwarded message ----------
From: Chris Lambacher <[EMAIL PROTECTED]>
Date: Jun 6, 2005 2:10 PM
Subject: Re: [pygtk] Image rendering
To: Prash <[EMAIL PROTECTED]>


gtk.gdk.PixbufLoader looks like it will do what you want:
http://www.pygtk.org/pygtk2reference/class-gdkpixbufloader.html

import urlib
f=urllib.urlopen("http://someserver.x.jpg";)
pbl = gtk.gdk.PixbufLoader()
pbl.write(f.read())
pb = pbl.get_pixbuf()
pbl.close()


Above is just an example, I did not try it out.  There seems to be a
lot of flexibility in how you actually get data in and out of the
loader.

-Chris

On 6/6/05, Prash <[EMAIL PROTECTED]> wrote:
> Sorry I didn;t mention in my post - I wanted to display that raw data
> directly than having to save it to a file. Is this possible?
>
> On 6/6/05, Jody Steele <[EMAIL PROTECTED]> wrote:
> > One way to do it, maybe not the "correct" way, would to be create a
> > temporary file that contains the contents of the file you retrieved from
> > the URL, and then load that into the gtk.Image.
> >
> > You probably want to look into the tempfile module.
> >
> > Hope this helps.
> >
> > Jody Steele
> >
> >
> >
> > On Sun, 05 Jun 2005 15:37:05 -0400, Prash <[EMAIL PROTECTED]> wrote:
> >
> > > Hi Guys .. need some help. My task is to fetch image from a url and
> > > then display using gtk image.
> > >
> > > I'm fetching image like
> > > import urlib
> > > f=urllib.urlopen("http://someserver.x.jpg";)
> > >
> > > f.read()  gives me a raw string. Now how do i display this using gtk
> > > image??
> > >
> > > TIA
> > > _______________________________________________
> > > pygtk mailing list   pygtk@daa.com.au
> > > http://www.daa.com.au/mailman/listinfo/pygtk
> > > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
> > >
> >
> >
> >
> > --
> > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
> >
> _______________________________________________
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
>


--
Christopher Lambacher
[EMAIL PROTECTED]


-- 
Christopher Lambacher
[EMAIL PROTECTED]
_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to