Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: How to use pack() with Gtk2::Gdk::Pixbuf

by insaniac (Friar)
on Sep 13, 2005 at 13:21 UTC ( [id://491570]=note: print w/replies, xml ) Need Help??


in reply to How to use pack() with Gtk2::Gdk::Pixbuf

muppet on the gtk-perl mailinglist found the solution ;-)
here's his message (well, at least the solution part ;) ):

Is the image data actually raw, packed, 24-bit pixels? If it's in a compressed format, you'll have to do incremental loading with a PixbufLoader. /me pokes google for EXIF thumbnail format According to http://park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif- + e.html#ExifThumbs the thumbnail will be JPEG or TIFF, not raw bits. Do this, instead: my $loader = Gtk2::Gdk::PixbufLoader->new; $loader->write ($data); $loader->close (); my $pixbuf = $loader->get_pixbuf (); (That code is from memory, check for yourself to make sure i'm not telling lies.)

It works like a charm now ;-)

to ask a question is a moment of shame
to remain ignorant is a lifelong shame

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://491570]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-04-24 11:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found