This is detailed insight into the science of the JPEG, which while intense, may give you a better understanding of why we use it, and when not to.