jerry-git / jerry-git/thug-memes

Add handling for cases in which sub image does not fit on top of base image

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
219
Forks
14
PR merge metrics
No merged PRs in 30d

Description

For example, if cigar/glasses image does not fit on top of the original image, the traceback is something like this:

`File "/Users/user/.virtualenvs/user-venv/lib/python3.5/site-packages/thug/meme/thug.py", line 122, in _draw_on_top
background = cv2.bitwise_and(background, background, mask=mask_inv)
cv2.error: /Users/travis/build/skvark/opencv-python/opencv/modules/core/src/arithm.cpp:241: error: (-215) (mtype == 0 || mtype == 1) && _mask.sameSize(*psrc1) in function binary_op`

Better exception is at least required. Best solution would probably be automatic rescaling of the sub image (cigar/glasses).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.