Is it possible to determine the resulting pixel values and modify them before the compressed jpeg image is actually created?
For example, I'm at the stage where I already have the quantized DCT coefficients of the original image and I want to change all pixels of the resulting image with a
(255, 255, 0) value to
(255, 254, 0).
What I was thinking is, if this is possible I would need to:
- Get the equivalent DCT coefficient of original image and do quantization
- Determine the resulting pixel values and do desired changes
- Obtain the new DCT coefficients that will result to it
- Proceed to Huffman encoding
Can the following be done during Huffman encoding?
- Get the equivalent DCT coefficient from YCbCr and do quantizations
- Do Huffman encoding and modify the desired pixel