Re: Gtk::Gdk::Pixmap: load from PNG or JPEG file

En lun, 2001-11-19 a 00:43, Joern Reder escribió:

Hi Perl hackers,

I'm using a Gtk::DrawingArea and draw Gtk::Gdk::Pixmaps on it. This 
works fine, so far. I initialize the Pixmap from a xpm file.

But xpm is a bad format to work with in real world szenarios, so I want
to load PNG or JPEG files. I checked the Gdk::Imlib reference 
documentation and tried this:

I think that Imlib is an obsoleted library. Try GdkPixBuf better.

-- Alvaro

    my $image = Gtk::Gdk::ImlibImage->load_image ($filename);
    my $gdk_pixmap = $image->copy_image;

But $gdk_pixmap is always undef. The same result with 

Does somebody know how to do this correctly?



Joern Reder - joern netcologne de
gtk-perl-list mailing list
gtk-perl-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]