So I am trying to write a simple bmp to jpeg image converter program. As you may know there are 3 major steps involved in jpeg compression, DCT, Quantization and entropy encoding. I want to write the values computed at each of these intermediate stages to a file.
Now my question is after I've converted each pixel's RGB value to YUV format and stored it into 3 separate 2-D arrays, is the DCT computed on each of these arrays? Thus giving me 3 different arrays with DCT applied on them? If that is correct then the next step would be to quantize each of the arrays corresponding to Y, U, and V. Then entropy encoding must be applied to each of these 2-D arrays.
How are these 3 arrays combined/written to a file so they can be readable as .jpeg files?