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 
$image->move_image.

Does somebody know how to do this correctly?

Thanks,

Joern

-- 
Joern Reder - joern netcologne de
supporting:   http://www.zyn.de/
unbelievable: http://www.netcologne.de/~nc-joernre/
CPAN:         http://www.perl.com/CPAN/modules/by-authors/id/J/JR/JRED
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list






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