Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Convert Gnome2::Canvas::Pixbuf to Image::Magick Array

by renegadex (Beadle)
on Jul 23, 2008 at 03:16 UTC ( #699490=snippet: print w/ replies, xml ) Need Help??

Description: This simple code will convert a Gnome2::Canvas::Pixbuf into a Image::Magick Array. Enjoy Perlmagick Programmers!
#Convert Gnome2::Canvas::Pixbuf To Image::Magick Array
sub convert_gnome2pixbuf_im {
    my $pixbuf_g = shift;
    print $pixbuf_g , "\n";
    #Convert Gnome2::Canvas::Pixbuf To Gtk2::Gdk::Pixbuf
    my $pixbuf = $pixbuf_g->get('pixbuf');
    print $pixbuf , "\n";
    #Convert Gtk2::Gdk::Pixbuf To BLOb
    my $blob = $pixbuf->save_to_buffer('jpeg');
    my $im = Image::Magick->new;
    #Convert BLOb to Image::Magick Array
    return $im
Comment on Convert Gnome2::Canvas::Pixbuf to Image::Magick Array
Download Code

Back to Snippets Section

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: snippet [id://699490]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2015-11-27 11:53 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (727 votes), past polls