Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Incremental Image Loading

by zentara (Archbishop)
on Nov 18, 2008 at 13:26 UTC ( #724254=note: print w/replies, xml ) Need Help??


in reply to Incremental Image Loading

To load a pixbuf from file:
#get raw image data #my $image_data = `cat image.png`; # easy shell out my $image_data; open (FH,"< image.png"); read( FH, $image_data, -s FH ); close FH; my $pixbuf = do { my $loader = Gtk2::Gdk::PixbufLoader->new(); $loader->write( $image_data ); $loader->close(); $loader->get_pixbuf(); }; #you can then make your thumbnails with the pixbuf methods my $pixbuf_smaller = $pixbuf->scale_simple(50,50,'bilinear'); my $img_smaller = Gtk2::Image->new_from_pixbuf($pixbuf_smaller);

I'm not really a human, but I play one on earth Remember How Lucky You Are

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2022-07-04 14:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?