Page 1 of 1

How to determine if a lossless image was a jpeg?

Posted: 2019-02-12T05:16:45-07:00
by Marsu42
This isn't im-specific, but I hope this can be done with some im magic or at least some folks can help otherwise:

I'm processing lossless images (png, tif, lossless webp) and am looking for a way to determine if it actually was a lossless format (i.e. jpeg most of the time) once. Visually, this is mostly obvious by looking for jpeg blocky artifacts or wavelet smoothing like in jpeg2k. But how to autmate it?

One idea is to compress the image as jpeg-lossy and then compare some metrics => if it was jpeg already once before, metrics should be very close?

Thanks for any hints!

Re: How to determine if a lossless image was a jpeg?

Posted: 2019-02-12T05:27:04-07:00
by snibgo
I think looking for patterns in blocks might work. See my reply at https://www.imagemagick.org/discourse-s ... 5&p=157734

Re: How to determine if a lossless image was a jpeg?

Posted: 2019-02-18T02:00:15-07:00
by Marsu42
snibgo wrote: 2019-02-12T05:27:04-07:00 I think looking for patterns in blocks might work. See my reply at https://www.imagemagick.org/discourse-s ... 5&p=157734
Thanks, so this thread is a dupe, I'll continue discussing in the other one.