patch: better performance for preview window
This commit is contained in:
parent
63422ccd88
commit
419dc1eada
3 changed files with 14 additions and 8 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -4,3 +4,4 @@ dist/
|
|||
__pycache__/
|
||||
.flatpak-builder/
|
||||
flatpak-build-dir/
|
||||
*.jpg
|
||||
|
|
12
CHANGELOG.md
12
CHANGELOG.md
|
@ -1,13 +1,19 @@
|
|||
# Changelog
|
||||
|
||||
## 1.3.x
|
||||
### 1.3.2 Fix - Fixed problem with app folders
|
||||
### 1.3.3: Patch – Increased Preview Performance x2
|
||||
- Reduced preview stutter: Previously, the image was updated twice when changing brightness or contrast. Now, it updates only once, improving performance by 100%.
|
||||
- There is still room for improvement. Analysis shows that image processing takes the most time, while displaying in Qt is relatively fast. Reducing the image size impacts performance, so resizing to 50% is a good idea.
|
||||
- There is an issue where `QRunner` does not always finish in the correct order when brightness or contrast values are changed rapidly. ATM I do not know how to fix this easly.
|
||||
- The "Preview" watermark now displays the brightness and contrast levels of the shown image.
|
||||
|
||||
### 1.3.2 Fix - Fixed problem with app folders (25.03.30)
|
||||
- Fixed a problem that the app folder path was not generated correctly.
|
||||
|
||||
### 1.3.1: Fix - Fixed insert exif not working
|
||||
### 1.3.1: Fix - Fixed insert exif not working (25.03.27)
|
||||
- Fixed the feature that inserted exif into images without modifying them.
|
||||
|
||||
### 1.3.0: Feature – Write Adjustments into EXIF
|
||||
### 1.3.0: Feature – Write Adjustments into EXIF (25.03.24)
|
||||
- Changes to contrast and brightness are now recorded in the EXIF comment section (labeled *Scanner* in the program).
|
||||
- This allows users to track what adjustments were made to an image.
|
||||
|
||||
|
|
|
@ -50,10 +50,8 @@ class PreviewWindow(QMainWindow, Ui_Preview_Window):
|
|||
self.ui.reset_contrast_Button.clicked.connect(lambda: self.ui.contrast_spinBox.setValue(0))
|
||||
|
||||
# Connect UI elements to `on_ui_change`
|
||||
self.ui.brightness_spinBox.valueChanged.connect(self.on_ui_change)
|
||||
self.ui.brightness_Slider.valueChanged.connect(self.on_ui_change)
|
||||
self.ui.contrast_spinBox.valueChanged.connect(self.on_ui_change)
|
||||
self.ui.contrast_Slider.valueChanged.connect(self.on_ui_change)
|
||||
self.ui.brightness_spinBox.valueChanged.connect(self.on_ui_change) # brightness slider changes spinbox value, do not need an event for the slider
|
||||
self.ui.contrast_spinBox.valueChanged.connect(self.on_ui_change) # contrast slider changes spinbox value, do not need an event for the slider
|
||||
self.ui.grayscale_checkBox.stateChanged.connect(self.on_ui_change)
|
||||
self.ui_elements(False)
|
||||
self.ui.show_OG_Button.pressed.connect(self.show_OG_image)
|
||||
|
@ -154,7 +152,8 @@ class ImageProcessorWorker(QRunnable):
|
|||
try:
|
||||
img = self.optima_manager.process_image_object(
|
||||
image_input_file = self.path,
|
||||
watermark = "PREVIEW",
|
||||
watermark = f"PREVIEW B:{self.brightness} S:{self.contrast}",
|
||||
font_size = 1,
|
||||
resize = self.resize,
|
||||
grayscale = self.grayscale,
|
||||
brightness = self.brightness,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue