From 911c2dd13051b5c195c60264d07ff7ff6cccc664 Mon Sep 17 00:00:00 2001 From: bptato Date: Fri, 26 Apr 2024 21:03:25 +0200 Subject: color: RGBAColor -> ARGBColor --- src/img/png.nim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/img/png.nim') diff --git a/src/img/png.nim b/src/img/png.nim index 0b486f23..1e75121b 100644 --- a/src/img/png.nim +++ b/src/img/png.nim @@ -106,7 +106,7 @@ type PNGReader = object i: int bitDepth: uint8 colorType: PNGColorType - background: RGBAColor + background: ARGBColor isend: bool idatBuf: seq[uint8] uprow: seq[uint8] @@ -116,8 +116,8 @@ type PNGReader = object strmend: bool atline: int plteseen: bool - palette: seq[RGBAColor] - trns: RGBAColor + palette: seq[ARGBColor] + trns: ARGBColor func width(reader: PNGReader): int {.inline.} = int(reader.bmp.width) @@ -307,7 +307,7 @@ proc unfilter(reader: var PNGReader; irow: openArray[uint8]; bpp: int) = else: reader.err "got invalid filter" -proc writepxs(reader: var PNGReader; crow: var openArray[RGBAColor]) = +proc writepxs(reader: var PNGReader; crow: var openArray[ARGBColor]) = case reader.colorType of pcGrayscale: var i = 0 @@ -387,7 +387,7 @@ proc readPLTE(reader: var PNGReader) = let len = reader.limit - reader.i if len mod 3 != 0: reader.err "palette length not divisible by 3" - reader.palette = newSeq[RGBAColor](len) + reader.palette = newSeq[ARGBColor](len) for i in 0 ..< len div 3: let r = reader.readU8() let g = reader.readU8() -- cgit 1.4.1-2-gfad0