diff options
author | bptato <nincsnevem662@gmail.com> | 2024-04-26 21:03:25 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-04-26 21:05:57 +0200 |
commit | 911c2dd13051b5c195c60264d07ff7ff6cccc664 (patch) | |
tree | 63ab17a0a4baf890aab4ac3f5a15da2876b2464d /src/img/png.nim | |
parent | 39a0678199431bf6bfdcec79007f2ac794cab72c (diff) | |
download | chawan-911c2dd13051b5c195c60264d07ff7ff6cccc664.tar.gz |
color: RGBAColor -> ARGBColor
Diffstat (limited to 'src/img/png.nim')
-rw-r--r-- | src/img/png.nim | 10 |
1 files changed, 5 insertions, 5 deletions
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() |