From 7e483d4a7d53d34259ea38f4ef9e6d6e5ea6ce46 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Sun, 5 Jun 2022 19:49:03 -0500 Subject: [PATCH] no func --- src/pixie/fileformats/qoi.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pixie/fileformats/qoi.nim b/src/pixie/fileformats/qoi.nim index 887191b..bc6c7f9 100644 --- a/src/pixie/fileformats/qoi.nim +++ b/src/pixie/fileformats/qoi.nim @@ -26,10 +26,10 @@ type Index = array[indexLen, ColorRGBA] -func hash(p: ColorRGBA): int = +proc hash(p: ColorRGBA): int = (p.r.int * 3 + p.g.int * 5 + p.b.int * 7 + p.a.int * 11) mod indexLen -func newImage*(qoi: Qoi): Image = +proc newImage*(qoi: Qoi): Image = ## Converts raw QOI data to `Image`. result = newImage(qoi.width, qoi.height) copyMem(result.data[0].addr, qoi.data[0].addr, qoi.data.len * 4)