61f78f48c7ed2847064b81343cf70e51cbe10ce1 40-free-form-bug-transparent: Previously png images, with only black as color, but different alpha values to simulate gray were turned completely black. Now when there are 4 channels, the alpha value is calculated as follows, while the RGB color is preserved: A-A*(Grayvalue(RGB)/255), - Grayvalue(RGB) is the grayvalue of the RGB value according to opencv. - A is the original alpha value. Type conversion in OpenCV must be done in order to work with floats, see the following type table: - https://gist.github.com/yangcha/38f2fa630e223a8546f9b48ebbb3e61a
Commit messages for #40
A-A*(Grayvalue(RGB)/255)
, - Grayvalue(RGB) is the grayvalue of the RGB value according to opencv. - A is the original alpha value. Type conversion in OpenCV must be done in order to work with floats, see the following type table: - https://gist.github.com/yangcha/38f2fa630e223a8546f9b48ebbb3e61a