Handle non RGB(A) samples
I was trying to apply blending.py to a grayscale image from the IAM offline dataset and I get this error:
Processing: iamdb_b05-045-s02-02.png
Traceback (most recent call last):
File "blending.py", line 66, in <module>
main("./handwriting_samples")
File "blending.py", line 57, in main
blended_img_float = darken_only(sample_img, cropped_bg, 1)
File "/home/achague/miniconda3/envs/test_opencv/lib/python3.7/site-packages/blend_modes/blending_functions.py", line 448, in darken_only
assert_image_format(img_in, _fcn_name, 'img_in')
File "/home/achague/miniconda3/envs/test_opencv/lib/python3.7/site-packages/blend_modes/type_checks.py", line 49, in assert_image_format
raise TypeError(err_msg)
TypeError: The blend_modes function "darken_only" received a 2-dimensional numpy array for its argument "img_in". The function however expects a 3-dimensional array for this argument in the shape (height x width x R/G/B/A layers). Please supply a 3-dimensional numpy array with that shape to the "img_in" argument.