Re: Gtk2::Image Loading a png from scalar



William B Carlson said:
I have a library (GD::Graph, GD::Dashboard, etc) that can create an image
and put it in scalar reference.  It can also make a physical file on the
file system which I can load in with Gtk2::Image->new_from_file("file.png").

What I want to know is if there is a way to take the scalar
( my $image = $dash->png() ) that the library can produce and load that into
the application without having to write the file to the file system and read
it again.

see perldoc Gtk2::Gdk::Pixbuf there are several new_from_xxx functions one of
which might fit the bill. they're pretty well documented as well. i don't know
that any of them will deal with png formatted data so you may have to feed
them something else, but hopefully that will get you going in the right
direction.

-rm



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