Commit f0686216 authored by atenart's avatar atenart

libmat2: images: fix handling of .JPG files

Pixbuf only supports .jpeg files, not .jpg, so libmat2 looks for such an
extension and converts it if necessary. As this check is case sensitive,
processing .JPG files does not work.

Fixes #47.
Signed-off-by: atenart's avatarAntoine Tenart <>
parent fe09d81a
......@@ -82,7 +82,7 @@ class GdkPixbufAbstractParser(_ImageParser):
def remove_all(self):
_, extension = os.path.splitext(self.filename)
pixbuf = GdkPixbuf.Pixbuf.new_from_file(self.filename)
if extension == '.jpg':
if extension.lower() == '.jpg':
extension = '.jpeg' # gdk is picky
pixbuf.savev(self.output_filename, extension[1:], [], [])
return True
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment