Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

NoonieBao
Copy link
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