Skip to content

Commit 2600fa2

Browse files
committed
Fix image_overlay bug
1 parent 1366528 commit 2600fa2

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)