Steganography involves cryptography, otherwise, your hidden data will decrease the entropy which, compared to the standard, will lead to its detection.
This method is known as DCT steganography. Here is a paper about this process.
Disclaimer: I didn’t read it, but it will certainly explain DCT algorithm.
The entropy is correlated to the maximal compression ration. Lower is the ratio, higher will be the entrepropy. Consequently, whatever the image is, a high quality or not, it is the file format that will affect the entropy.
jpeg > png > bmp
Further reading about entropy: