瀏覽代碼

pythonlib: fix https://trac.osgeo.org/grass/ticket/3367 - creating gif files

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@71243 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 7 年之前
父節點
當前提交
06b8d2edc6
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lib/python/imaging/images2gif.py

+ 2 - 2
lib/python/imaging/images2gif.py

@@ -334,8 +334,8 @@ class GifWriter:
             Y = np.argwhere(diff.sum(1))
             # Get rect coordinates
             if X.size and Y.size:
-                x0, x1 = X[0], X[-1] + 1
-                y0, y1 = Y[0], Y[-1] + 1
+                x0, x1 = int(X[0]), int(X[-1] + 1)
+                y0, y1 = int(Y[0]), int(Y[-1] + 1)
             else:  # No change ... make it minimal
                 x0, x1 = 0, 2
                 y0, y1 = 0, 2