Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

Commit

Permalink
Release 0.4.0
Browse files Browse the repository at this point in the history
Add logs
  • Loading branch information
riderius committed Nov 6, 2020
1 parent bbe0fdf commit be380c0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 36 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,6 @@ dmypy.json

# Pyre type checker
.pyre/

# Archived logs in zip
*.log.zip
Binary file modified Image-Viewer.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020
Copyright (c) 2020 RIDERIUS

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Hi! **Image-Viewer** is a Windows image viewer based on Python 3.

## Using:
## Using

You must download "Image-Viewer.exe" from the root of the repository. Then you have to open the image with "Image-Viewer.exe".

Expand All @@ -16,15 +16,17 @@ Then you will see a window like this:

![image](https://image.prntscr.com/image/S9h0mVITT2Kyq7lt-Z-nJw.png)

## Modules Used:
## Modules Used

1. pillow
2. loguru

Python 3.8 or higher is recommended for using this program. You need to install the pillow module. You can do this with the following command:

> pip install -r requirements.txt
**Pillow** is the friendly PIL fork by Alex Clark and Contributors. **PIL** is the Python Imaging Library by Fredrik Lundh and Contributors.
**Loguru** is a library which aims to bring enjoyable logging in Python.

## Compilation

Expand Down
34 changes: 1 addition & 33 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def show_version():
""" This function shows the version. """

logger.info('Function show_version was initialized.')
messagebox.showinfo('Version', 'Version 0.3.0')
messagebox.showinfo('Version', 'Version 0.4.0')
logger.info('Function show_version was closed.')


Expand Down Expand Up @@ -100,37 +100,6 @@ def cropping():
cropping_window.mainloop()


@logger.catch
def resize_image():
""" This function is needed to resizing images. """

@logger.catch
def resizing():
logger.info('Function resize_image and resizing was closed.')

resizing_window = Tk()
resizing_window.geometry('404x65')
resizing_window.title('Resize Image')
resizing_window.resizable(False, False)

x_label_resizing_window = Label(resizing_window, text='Width Image')
x_label_resizing_window.grid(column=0, row=0)
y_label_resizing_window = Label(resizing_window, text='Height Image')
y_label_resizing_window.grid(column=2, row=0)

x_entry_resizing_window = Entry(resizing_window,)
x_entry_resizing_window.grid(column=1, row=0)
y_entry_resizing_window = Entry(resizing_window)
y_entry_resizing_window.grid(column=3, row=0)

button_resizing_window = Button(
resizing_window, text='Submit', command=resizing)
button_resizing_window.grid(column=2, row=1)

logger.info('Function resize_image was initialized.')
resizing_window.mainloop()


FILE_PATH = str(sys.argv[1])

image_pil = Image.open(FILE_PATH)
Expand All @@ -151,7 +120,6 @@ def resizing():
about_menu.add_command(label='Github', command=opening_github)
about_menu.add_command(label='Version', command=show_version)
edit_image_menu.add_command(label='Crop Image', command=crop_image)
edit_image_menu.add_command(label='Resize Image', command=resize_image)

menu.add_cascade(label='About', menu=about_menu)
menu.add_cascade(label='Edit Image', menu=edit_image_menu)
Expand Down

0 comments on commit be380c0

Please sign in to comment.