pixbuf to pixmap



Hi all,
I'm trying to use the gdk-pixbuf for making preview of image files.
these is a sample of my code:

$pixbuf = new_from_file Gtk::Gdk::Pixbuf($img_file_path);
($pixmap, $mask) = $pixbuf->render_pixmap_and_mask($alpha_threshold);
$pm = new Gtk::Pixmap($pixmap,$mask);

But it doesn't work! :-/

I don't really understand what is $alpha_threshold how can i get it.
in my code it's equal to 0 and $mask is undef.
so $pm isn't a widget.
What i'm doing wrong ??
thanks and regards

nathan

Mandrake Linux release 9.0 (Cooker) for i586




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