diff --git a/scripts/image.lua b/scripts/image.lua index af67baaf0..b0d08df9c 100644 --- a/scripts/image.lua +++ b/scripts/image.lua @@ -12,6 +12,7 @@ local a = Image(32, 64) assert(a.width == 32) assert(a.height == 64) assert(a.colorMode == ColorMode.RGB) -- RGB by default +assert(a.rowStride == 32*4) assert(a:isEmpty()) assert(a:isPlain(rgba(0, 0, 0, 0))) assert(a:isPlain(0)) @@ -21,6 +22,7 @@ do assert(b.width == 32) assert(b.height == 64) assert(b.colorMode == ColorMode.INDEXED) + assert(b.rowStride == 32*1) local c = Image{ width=32, height=64, colorMode=ColorMode.INDEXED } assert(c.width == 32)