Skip to content

Commit 7409e8f

Browse files
committed
Legacy Code Rewrites + Fixes
1 parent 4a4fd1e commit 7409e8f

File tree

2 files changed

+161
-170
lines changed

2 files changed

+161
-170
lines changed

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
# Version 0.2.8.2 - (2020-08-26)
2+
## Changes
3+
- Support for morphing two images of different sizes, while initially left up in the air as a potential feature, is no longer being considered
4+
- Consequently, the variables <b>self.leftScalar</b> and <b>self.rightScalar</b> have been converted to <b>self.imageScalar</b>
5+
- Since only one scalar is calculated now, <b>resizeEvent()</b> has received a performance boost as a result
6+
- The program will now warn the user (via the notification bar) when they load two images of different sizes
7+
- Comment: <i> I'm considering adding two buttons to the GUI that resize the left image to the right image and vice versa.</i>
8+
- Memory Optimization: Removed <b>all</b> instances of the variables used to:
9+
- Flag when the GUI was being resized: <b>self.resizeFlag</b>
10+
- Flag when left/right images were loaded: <b>self.leftOn</b>, <b>self.rightOn</b>
11+
- Flag whether left/right images were PNGs: <b>self.leftPNG</b>, <b>self.rightPNG</b>, <b>leftTypeRegex</b>, <b>rightTypeRegex</b>
12+
- Flag whether the smoothing box was checked: <b>self.smoothBoxSetting</b>
13+
- Flag whether the transparency box was checked: <b>self.transparencySetting</b>
14+
- Flag whether the full blend box was checked: <b>self.blendBoxSetting</b>
15+
- Flag whether the user has performed a morph in the current session: <b>self.blendExecuted</b>
16+
- Store triangle color slider values: <b>self.redVal</b>, <b>self.blueVal</b>, <b>self.greenVal</b>
17+
- Store an ADDITIONAL COPY (!!!) of each image's chosen points: <b>self.startingText</b>, <b>self.endingText</b>
18+
- Comment: <i> This was legacy code, for sure, but it took me a bit to even understand that these LISTS (not boolean flags.. lists!)
19+
existed purely to indicate whether each input image's text file was empty or not. The memory cost for implementing that check this way was
20+
laughable, so the program now uses "if not os.stat(filename).st_size:" instead. Much better!</i>
21+
- Variables declared during <b>MorphingApp.py</b>'s initialization have been re-arranged by type (for source code clarity)
22+
- Additionally, detailed comments have now been given to all variables (and Qt signals) found under initialization (for source code clarity)
23+
24+
## Fixes
25+
- Fixed a long-standing bug where .jpg blends could sometimes appear in the GUI to be wildly distorted and - occasionally - grayscale
26+
- Comment: <i> When saved, these images were perfectly fine.. the problem was coming from a Qt pixmap conversion error.
27+
A BPL (bytes per line) parameter has been added to .jpg QImage construction syntax to resolve the issue.</i>
28+
- <b>autoCorner()</b> now checks that <i>neither</i> image contains each corner point before adding it
29+
- Comment: <i> Originally, the function was only checking that the left image didn't have each particular corner point; in retrospect,
30+
this could potentially cause problems if the right image DID have that corner point (as this would then lead to duplication for the right image).</i>
31+
- Removed a conflicting legacy initialization of self.leftSize and self.rightSize in <b>MorphingApp.py</b>
32+
133
# Version 0.2.8.1 - (2020-08-25)
234
## Fixes
335
- Hotfixed a bug where <b>verifyValue()</b> for the frame time textbox was accepting 0 as a valid number

0 commit comments

Comments
 (0)