Commits

Leonard Ritter committed 0f061e9

fixed wrong map size when customizing plane size

Comments (0)

Files changed (1)

stbimage/__init__.py

     x = x[0]
     y = y[0]
     n = n[0]
-    size = x*y*n
+    if c:
+        size = x*y*c
+    else:
+        size = x*y*n
     return x,y,n,_ffi.cast('char[{0}]'.format(size), result)
 
 # add wrapped functions