The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::MathImage::Gtk2::Ex::PixbufBits -- misc Gtk2::Gdk::Pixbuf helpers

SYNOPSIS

 use App::MathImage::Gtk2::Ex::PixbufBits;

FUNCTIONS

$format = App::MathImage::Gtk2::Ex::PixbufBits::filename_to_format ($filename)

Return the Gtk2::Gdk::PixbufFormat for the given $filename from its extension. For example foo.png is PNG format. If the filename is not recognised then return undef.

PixbufFormat is new in Gtk 2.2. Currently filename_to_format throws an error in Gtk 2.0.x. Would returning undef be better? Or some compatibility fakery?

App::MathImage::Gtk2::Ex::PixbufBits::format_matches_filename ($format, $filename)

$format should be a Gtk2::Gdk::PixbufFormat object. Return true if one of its extensions matches $filename. For example JPEG format matches foo.jpg or foo.jpeg.