If you don't want to lose any image information when you compress it then you need to use a lossless image compression method such as PNG.
Such methods don't provide as much compression as the lossy ones, such as JPEG (which uses DCT), but they retain all the image information.