Skip to content

Commit 0af50c2

Browse files
committed
Merge pull request #187 from andrewgiessel/image_overlay_tweaks
write_png fix!
2 parents 792d334 + bb22ec2 commit 0af50c2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

folium/utilities.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,9 @@ def write_png(array):
364364
frame = array_full[:, :, component]
365365
array_full[:, :, component] = (frame / frame.max() * 255)
366366
array_full = array_full.astype('uint8')
367-
width, height = array_full.shape[:2]
368-
367+
height, width = array_full.shape[:2]
368+
array_full = np.flipud(array_full)
369+
369370
array_full = array_full.tobytes()
370371

371372
# Reverse the vertical line order and add null bytes at the start.

0 commit comments

Comments
 (0)