JPEG images are a common standard used in IT field to store images and therefore generally these image files can be opened and viewed by almost every computation devices.
On the other hand, suppose you want to edit and share an image that contains a diagrams in a jpg file. If you want to re-edit the image, you would need to edit that image in a separate file.
However jpg images can store addition data in the jpg files without causing any corruption. So this software should be able to store details on the diagrams in the image and when saved it should output the content as jpg which can be still opened and viewed through a normal image viewer.