Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the output of the libjpeg always RGB (or luminance for monochrome images)?

Tags:

c++

libjpeg

I use he libjpeg to manipulate jpeg images.
My question is simple :
Is the output of the libjpeg always RGB (or luminance for monochrome images) ?
I'm not an expert with the color spaces... Thanks !

like image 321
PacCol Avatar asked Jan 26 '26 23:01

PacCol


1 Answers

Strictly speaking, JPEG is always YCbCr (YUV), so that's the output. You may apply other colorspaces, but typically only RGB or (less commonly) CMYK are supported, and the underlying data in the file will remain YCbCr. Grayscale simply leaves the second two channels out and only encodes Y.

like image 122
superstator Avatar answered Jan 28 '26 15:01

superstator



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!