mirror of
https://github.com/Kilian/Trimage.git
synced 2026-01-25 17:48:41 -05:00
Fix filetype after last commit
This commit is contained in:
parent
d2c0a7905b
commit
fb1c463a03
1 changed files with 4 additions and 2 deletions
|
|
@ -398,8 +398,10 @@ class Image:
|
|||
self.reset()
|
||||
self.fullpath = fullpath
|
||||
if path.isfile(self.fullpath) and access(self.fullpath, WRITEABLE):
|
||||
self.filetype = path.splitext(self.fullpath)[1]
|
||||
if self.filetype in [".jpeg", ".jpg", ".png"]:
|
||||
self.filetype = path.splitext(self.fullpath)[1][1:]
|
||||
if self.filetype == "jpg":
|
||||
self.filetype = "jpeg"
|
||||
if self.filetype in ["jpeg", "png"]:
|
||||
oldfile = QFileInfo(self.fullpath)
|
||||
self.shortname = oldfile.fileName()
|
||||
self.oldfilesize = oldfile.size()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue