Kevin Ryde > math-image > App::MathImage::Gtk2::Ex::PixbufBits

Download:
math-image-110.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 110   Source  

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.

syntax highlighting: