pixbuf

Load and show an image from the web in Python with Gtk 3?

限于喜欢 提交于 2019-12-23 09:32:19
问题 I'm writing an app on Ubuntu 12.04 with Python and GTK 3. The problem I have is that I can't figure out how I should do to show a Gtk.Image in my app with an image file from the web. This is as far as I have come: from gi.repository import Gtk from gi.repository.GdkPixbuf import Pixbuf import urllib2 url = 'http://lolcat.com/images/lolcats/1338.jpg' response = urllib2.urlopen(url) image = Gtk.Image() image.set_from_pixbuf(Pixbuf.new_from_stream(response)) I think everything is correct except

Ruby GTK Pixbuf timed image change

折月煮酒 提交于 2019-12-22 14:04:13
问题 I am creating an image slideshow in ruby, using gtk pixbuf to load images. I am very new to ruby & GTK, this may be an stupid question. Currently image changes are linked to the GUI button_press_event, I would like them to change /refresh automatically based on a set time, like a slideshow or animation. I saw the gtk animation using a gif method, but I would like to use individual jpeg files inline sequence, so that I can set the time to show a slide. Once the loop has gone through all the

Ruby GTK Pixbuf timed image change

一曲冷凌霜 提交于 2019-12-06 08:24:27
I am creating an image slideshow in ruby, using gtk pixbuf to load images. I am very new to ruby & GTK, this may be an stupid question. Currently image changes are linked to the GUI button_press_event, I would like them to change /refresh automatically based on a set time, like a slideshow or animation. I saw the gtk animation using a gif method, but I would like to use individual jpeg files inline sequence, so that I can set the time to show a slide. Once the loop has gone through all the images, the GUI should display buttons for replay or quit. ( I haven't used @time yet, it is just there