From 8d57ba910347953f56b88a93389c1656e5b6f19e Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Thu, 12 May 2022 23:09:37 -0500 Subject: [PATCH] f --- src/pixie/fileformats/jpeg.nim | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/pixie/fileformats/jpeg.nim b/src/pixie/fileformats/jpeg.nim index de625b0..c13d9b3 100644 --- a/src/pixie/fileformats/jpeg.nim +++ b/src/pixie/fileformats/jpeg.nim @@ -883,13 +883,9 @@ proc yCbCrToRgbx(py, pcb, pcr: uint8): ColorRGBX = result.b = clampByte(b shr 20) result.a = 255 -proc grayScaleToRgbx(gray: uint8): ColorRGBX = +proc grayScaleToRgbx(gray: uint8): ColorRGBX {.inline.} = ## Takes a single gray scale component output and populates image. - let g = gray - result.r = g - result.g = g - result.b = g - result.a = 255 + rgbx(gray, gray, gray, 255) proc buildImage(state: var DecoderState): Image = ## Takes a jpeg image object and builds a pixie Image from it.