Fix a bug introcuded in 13f43bf: allow extensions even in upper case

This commit is contained in:
Huluti 2019-02-23 20:58:02 +01:00
parent 9ea961e87c
commit 5553e7fabe

View file

@ -347,7 +347,7 @@ class Image:
self.reset() self.reset()
self.fullpath = fullpath self.fullpath = fullpath
if path.isfile(self.fullpath) and access(self.fullpath, W_OK): if path.isfile(self.fullpath) and access(self.fullpath, W_OK):
self.filetype = path.splitext(self.fullpath)[1][1:] self.filetype = path.splitext(self.fullpath)[1][1:].lower()
if self.filetype == "jpg": if self.filetype == "jpg":
self.filetype = "jpeg" self.filetype = "jpeg"
if self.filetype in ["jpeg", "png"]: if self.filetype in ["jpeg", "png"]: