Cleaned up comments and spacing.
This commit is contained in:
4
main.py
4
main.py
@@ -50,7 +50,7 @@ class MangaReader:
|
||||
self.panel.pack()
|
||||
|
||||
def open_menu(self):
|
||||
# file dialog. reset page counts, call display Maanga passing in starting values
|
||||
# file dialog. reset page counts, call display Manga passing in starting values
|
||||
mangaFile = filedialog.askopenfilename()
|
||||
self.file = mangaFile
|
||||
self.page = 0
|
||||
@@ -70,6 +70,7 @@ class MangaReader:
|
||||
data = zip.read(fl[pg])
|
||||
im = Image.open(io.BytesIO(data))
|
||||
|
||||
# I found the below code to maintain image ratios at https://stackoverflow.com/questions/273946/how-do-i-resize-an-image-using-pil-and-maintain-its-aspect-ratio
|
||||
wpercent = (basewidth / float(im.size[0]))
|
||||
hsize = int((float(im.size[1]) * float(wpercent)))
|
||||
|
||||
@@ -102,7 +103,6 @@ class MangaReader:
|
||||
print(self.page)
|
||||
print("FUCCK YOU")
|
||||
|
||||
|
||||
# initalize tk
|
||||
root=Tk()
|
||||
app = MangaReader(root)
|
||||
|
||||
Reference in New Issue
Block a user