The more I think about it, the more ridiculous it seems that a JPEG would be decompressed and recompressed every time you open it. Why would a simple picture viewer have the algorithm to compress a JPEG built into it?

I even performed bitwise editing of a JPEG image at university.