Re: Gtk2::Image Loading a png from scalar




Dov Grobgeld said:
Gtk2::Gdk::Pixbuf->new_from_data

you beat me to it.  ;-)


There doesn't seem to be a way of doing the same with compressed
png data though...

sure there is, it's just nowhere near as straightforward --- you have to use a
Gtk2::Gdk::PixbufLoader and simulate an incremental read.

  my $loader = Gtk2::Gdk::PixbufLoader->new;
  $loader->write ($compressed_data);
  $loader->close;
  my $pixbuf = $loader->get_pixbuf;


-- 
muppet <scott at asofyet dot org>



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