# HG changeset patch # User sam # Date 1712148582 -25200 # Node ID 84d9822c028d8d2ff345eb114b0a1985b8bfd933 # Parent bfcec39dfb0bce77c567e0ef51bc79cd5759379f fix: classic, off-by-one XD diff -r bfcec39dfb0b -r 84d9822c028d semicongine/core/imagetypes.nim --- a/semicongine/core/imagetypes.nim Wed Apr 03 16:00:33 2024 +0700 +++ b/semicongine/core/imagetypes.nim Wed Apr 03 19:49:42 2024 +0700 @@ -71,7 +71,7 @@ proc asLinear*[T](image: Image[T]): Image[T] = result = Image[T](width: image.width, height: image.height, imagedata: newSeq[T](image.imagedata.len)) - for i in 0 .. image.imagedata.len: + for i in 0 ..< image.imagedata.len: result.imagedata[i] = srgb2linear(image.imagedata[i]) proc `$`*(image: Image): string =