The most common information about images i/o you can find in official documentation for imread and imwrite function. If you need more information you need to investigate libjpeg, libpng, libtiff, etc documentation and source code of OpenCV highgui module.