mirror of
https://github.com/Kilian/Trimage.git
synced 2026-01-26 01:58:41 -05:00
Fix a bug introcuded in 13f43bf: allow extensions even in upper case
This commit is contained in:
parent
9ea961e87c
commit
5553e7fabe
1 changed files with 1 additions and 1 deletions
|
|
@ -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"]:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue