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 returnundef
.PixbufFormat is new in Gtk 2.2. Currently
filename_to_format
throws an error in Gtk 2.0.x. Would returningundef
be better? Or some compatibility fakery? App::MathImage::Gtk2::Ex::PixbufBits::format_matches_filename ($format, $filename)
-
$format
should be aGtk2::Gdk::PixbufFormat
object. Return true if one of its extensions matches$filename
. For example JPEG format matches foo.jpg or foo.jpeg.