Skip to content

Commit 3c23538

Browse files
committed
BF: scale alpha mask correctly
1 parent 2a7d951 commit 3c23538

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

imageprocessing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def imread(image, output_dtype=np.float64, pad_depth_channel=True,
100100
orig_dtype = im.dtype
101101
im = im.astype(np.float64)
102102
im, mask = np.split(im, [-1], axis=-1)
103-
im *= mask / mask.max()
103+
im *= mask / 255
104104
im = im.astype(orig_dtype)
105105
elif alpha_action == 'error':
106106
raise Exception('Image contains alpha channel')

0 commit comments

Comments
 (0)