App::MathImage::Gtk2::Ex::PixbufBits -- misc Gtk2::Gdk::Pixbuf helpers
use App::MathImage::Gtk2::Ex::PixbufBits;
$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.
Gtk2::Gdk::PixbufFormat
$filename
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?
filename_to_format
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.
$format
To install App::MathImage, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::MathImage
CPAN shell
perl -MCPAN -e shell install App::MathImage
For more information on module installation, please visit the detailed CPAN module installation guide.