ImageCut is a convenient tool to cut a long vertical image to many pieces, some parameters can be set when cutting such as max resolution and max file size.
It is designed to cut these kind of images:
- screenshot of a long web page
- a doc or pdf file that saved as one image
A basic process is as follows:
- Press "Open" button to open a image
- Add cut lines
- "Left Click" on image to add cut line
- "Right Click" to remove cut line
- "Clear" button on remove all cut lines
- "Ctrl" + "Mouse Wheel" to zoom in and out
- Press "Set" button to set parameters such as max resolution and max file size
- Press "Save" button to save cut pieces, finish when the "Save" button turns to green
- cut pieces will be saved in the same directory as the origin image
- cut pieces will be saved in jpg format
- When packed into exe, the start-up time of ImageCut is too slow
- The method to show display image wastes too much calculation
This code is based on python3 with PyQt5. There are 4 classes: MainWindow, SettingsDialog, ImgWidget, ImgProcess
- MainWindow: main window that connects the other parts
- SettingsDialog: a dialog that sets parameters when cutting
- ImgWidget: a widget based on QLabel and ImgProcess that can display and peocess images conveniently
- ImgProcess: contains almost all algorithms of images such as zoom and cut