Skip to main content
Known Participant
June 16, 2024
Question

Does a "Non-Destructive" JPG exists?

  • June 16, 2024
  • 4 replies
  • 1562 views

Hope somebody can help me with this.

A long time ago (maybe a year) I got an image from a customer and from what I remember it was a JPG file, but there was an option to restore the image back to it's original state. At least that is the way I remember it, but I can't recall what it was. So I hope somebody can help me.

In my recollection it was a JPG and when I clicked on 'something' the edit which was done to the image was corrected back to the original file.  So, something was done to the image, but it still was saved as a JPG but when I opened it I could turn the edit back.

I'm sure it wasn't an PSD or TIFF which contained the original file in a layer. I'm pretty sure it was a JPG and I was surprised that a JPG could be brought back to the original state.

Someone?

This topic has been closed for replies.

4 replies

Legend
June 17, 2024

Almost no file format will allow perfect reversion to pre-editing state. For example, what if you cropped half of the image out? You'd need a file that had both the original and the final saved version. You CAN do that with a DNG file that contains non-destructive edits from ACR/Lightroom, but otherwise no.

Conrad_C
Community Expert
Community Expert
June 16, 2024

There can be non-destructive editing of a JPG file, which is how Adobe Camera Raw, Lightroom, and how many newer consumer and mobile apps do it such as Apple Photos.

 

Although the JPG file itself will undergo degradation if edited and then saved back to the same file, that can be avoided if the edits are stored separately from the image file as metadata, such as in a database. By storing the edits separately, it’s possible to “revert” the JPG to its original state. But that’s not what really happened, the reality is that the edits were never actually applied to the original JPG.

 

This is how it works on an iPhone, for example. If someone sends me a JPG and I edit it on my iPhone, it’s always possible to snap it back to its original state because it silently created a copy that is shown to me as the edited version. I just have to tap the Revert button, and it swaps the original back in to show me.

 

Because this question was posted in the Photoshop community, the first thing to say is that this is not something you can do with Photoshop. If you edit a JPG in Photoshop and save that, the original pixels are directly edited and so saving that slightly degrades the image after JPEG compression is re-applied. An alternative is to open the JPG, edit it (maybe after saving that as PSD or TIFF as you mentioned), save/export a JPG copy, and don’t save changes to the original JPG. But then you would be aware that you are now managing multiple files. The way you get back to the original is to use it instead of the copy.

 

If Adobe Camera Raw or Lightroom were used, those work like Apple Photos: They store and render the edits separately from the original image file, so to see the original again you just revert (throw out) the edit metadata.

Marc VanZAuthor
Known Participant
June 17, 2024

@Conrad_C @davescm @Rob_Cullen @D Fosse 

Thanks for your replies. Unfortunately I can't remember what the "trick" was. I am 100% sure it was a JPG because I remember thinking: "Wow, never knew that was possible with a JPG-file".

There is also no such thing as saving a 'Smart Object" as a JPG-file?

c.pfaffenbichler
Community Expert
Community Expert
June 17, 2024
quote

I'm 100% sure it was a JPG file which was editable in a way that I didn't know it was possible. Just a simple trick. It's better to close this thread because I have too little information.


By @Marc VanZ

 

Actually, there is all the information you need here. Jpeg compression is not reversible. It's not in the algorithm, it's not possible. That's it.

 

Yes, you can edit a jpeg non-destructively, as long as you stay within that application. But the jpeg cannot leave that application in a non-destructive way - except by saving it out in a different file format, or by opening it in the same application, e.g. ACR which stores metadata in the file header.

 

But you cannot get that jpeg out of ACR, as a jpeg, without a new destructive compression.

 


Pure formality: 

I recall reading that JPEG theoretically provides an option for lossless compression but the jpg-files we use are jfif and employ the lossy compression we generally mean when we say »jpg«. 

 

Quote from 

https://en.wikipedia.org/wiki/JPEG

»The JPEG standard includes a lossless coding mode, but that mode is not supported in most products.«

Rob_Cullen
Community Expert
Community Expert
June 16, 2024

Maybe it was a DNG file-type.

A DNG file ( If converted from a raw camera file) can contain the raw data and editing metadata that is recognised in Adobe Photo apps, and can be re-edited (back to original state).

 

Regards. My System: Windows-11, Lightroom-Classic 15.1.1, Photoshop 27.3.1, ACR 18.1.1, Lightroom 9.0, Lr-iOS 10.4.0, Bridge 16.0.2 .
Marc VanZAuthor
Known Participant
June 16, 2024

I'm pretty sure it was a JPG. 

Marc VanZAuthor
Known Participant
June 16, 2024

Is it possible to save a file as a JPG with a 'layer-construction'? 

D Fosse
Community Expert
Community Expert
June 16, 2024

No such thing.

 

Jpeg compression is always destructive and non-reversible. No exception.

 

There are "de-jpeg" algorithms to remove/restore the artifacts, with varying success. Photoshop has an ai based de-jpeg neural filter, which is reasonably effective. But of course, it's still guessing, just making better guesses.