Skip to content

Fixed abnoma Alpha of output img. Fixed a potential issues. #8

Open
NoonieBao wants to merge 3 commits into
Datadolittle:masterfrom
NoonieBao:master
Open

Fixed abnoma Alpha of output img. Fixed a potential issues. #8
NoonieBao wants to merge 3 commits into
Datadolittle:masterfrom
NoonieBao:master

Conversation

@NoonieBao
Copy link
Copy Markdown
Contributor

  1. Fixed a long-standing potential issue: when Image_Tester.py is not executed in advance and there are unsafe images, which lead to abnormal output.

    The line avgs.append(getAverageRGB(img)) in case of an exception will result in the length of avgs being less than the length of input_images, causing index confusion and abnormal output.

  2. Fixed incorrect alpha blending.

    For example, two pixels that are not totally opaque (less than 255), no matter how they are overlaid, will remain not totally opaque. Therefore, we always output as RGB (jpeg).

  3. Optimization coding. Since the script only consider the RGB channels when matching images, we can set and blend the alpha channel at the end to enhance code readability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant