Skip to content

Commit 1ac45c8

Browse files
committed
Merge pull request #286 from ocefpaf/image_overlay_bug
It's okay. Merge.
2 parents 01cd285 + 2600fa2 commit 1ac45c8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

folium/utilities.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,8 @@ def write_png(data, origin='upper', colormap=None):
488488

489489
# Normalize to uint8 if it isn't already.
490490
if array.dtype != 'uint8':
491-
array *= 255/array.max(axis=(0, 1)).reshape((1, 1, 4)).astype('uint8')
491+
array = array * 255./array.max(axis=(0, 1)).reshape((1, 1, 4))
492+
array = array.astype('uint8')
492493

493494
# Eventually flip the image.
494495
if origin == 'lower':

0 commit comments

Comments
 (0)