As a simple 8X8 matrix can be encrypted by performing DCT over it and the original matrix can be easily decrypted by applying IDCT over the DCT matrix; I am trying to apply DCT on every block of an image by 'block processing' (block size 8 ).
After performing the DCT on every block of the image, I'll be left with a very big matrix with DCT values. Now I want to write an image with the DCT values(representing an encrypted image). The problem is that the grayscale image can only store values from 0-255.
How is it possible to store the the DCT values in an image?
I AM NOT TRYING TO DO A COMPLETE JPEG COMPRESSION. Just the DCT and IDCT over an image in java.