Gtk2::G...ufLoader(3)
π Gtk2::Gdk::PixbufLoader β the whole vibe π
okay bestie, so this page is from the User Contributed Perl Documentation corner of the perl-verse, and it's all about Gtk2::Gdk::PixbufLoader β which is just a lil wrapper for GdkPixbufLoader π. it loads pixbufs. it's giving image-decoder-with-main-character-energy. no cap.
πΈ HIERARCHY πΈ
the family tree, and yes it's a whole lineage:
Glib::Object
+----Gtk2::Gdk::PixbufLoader
so it inherits from Glib::Object and that's the entire ancestry, periodt. π
β¨ METHODS β¨
pixbufloader = Gtk2::Gdk::PixbufLoader->new
the classic. just make one. that's it, that's the method. π
pixbufloader = Gtk2::Gdk::PixbufLoader->new_with_mime_type ($mime_type)
make a loader but you already know the mime type, so you tell it upfront. may croak with a Glib::Error in $@ on failure β so like, wrap it, bestie, don't just rawdog it. π
Since: gtk+ 2.4 β so if you're on something ancient, this one's not for you.
pixbufloader = Gtk2::Gdk::PixbufLoader->new_with_type ($image_type)
same energy but you're passing an image type instead of a mime type. may croak with a Glib::Error in $@ on failure. protect ya neck. π«Ά
pixbufanimation or undef = $loader->get_animation
grab the animation if there is one β and note the or undef, because sometimes there just isn't and the universe said no. π
$loader->close
close it up, wrap it up, done. may croak with a Glib::Error in $@ on failure. π
hash reference = $loader->get_format
you get back a hash reference with the format deets. iconic.
Since: gtk+ 2.2
pixbuf = $loader->get_pixbuf
the moment we've all been waiting for β it hands you the actual pixbuf. ate. π₯
$loader->set_size ($width, $height)
set the size, obviously. the args:
$width(integer) β the width, fr fr$height(integer) β the height, obviously
Since: gtk+ 2.2
boolean = $loader->write ($buf)
feed it data, get a boolean back. the args:
$buf(scalar)
may croak with a Glib::Error in $@ on failure. ngl this is the one you'll be calling in a loop like a lil gremlin, so handle the croak. π
π¦ SIGNALS π¦
the loader talks back, and here's everything it says:
area-prepared(Gtk2::Gdk::PixbufLoader)area-updated(Gtk2::Gdk::PixbufLoader, integer, integer, integer, integer)closed(Gtk2::Gdk::PixbufLoader)size-prepared(Gtk2::Gdk::PixbufLoader, integer, integer)
yes, area-updated takes four integers. it's extra like that. π
π SEE ALSO π
go read these too, bestie, they're the lore:
Gtk2Glib::Object
π COPYRIGHT π
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See Gtk2 for a full notice.
okay that's the whole page!! this lil doc was cooked up by the perl crew on 2025-07-25 and it's running on perl v5.42.0 β the perl documentation girlies really said "here's your manual, slay". go forth and load some pixbufs, bestie, you got this π§πβ¨
π¦ where this page comes from
- fedora 43: perl-Gtk2 1.24993-23.fc43 Β· LicenseRef-Callaway-LGPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms