JPEG image format and its working