Re: problem to display gif file



Here are the key pieces of what I use (I happen to use jpegs but imlib
supports gifs as well.)  I get the impression that Gdk::Pixbuf is the
"new" way to do it, but imlib works for me...

    $newimage = load_image Gtk::Gdk::ImlibImage($test_filename);
        $newimage->render($use_w, $use_h);
        my $my_image = $newimage->copy_image();
        my $my_mask  = $newimage->copy_mask();
$w = $g->get_widget('image_edit_pixmap');
        $w->set($my_image, $my_mask);

image_edit_pixmap is a <class>GtkPixmap</class>.



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