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



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:

    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



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