Friday 4 January 2019

software - Is a JPG guaranteed to produce the same pixels?


I know there are plenty of benefits to shooting in RAW, but at the moment it seems that JPG works just fine for me. The file sizes are way smaller, and darktable seems to work just fine with them (although interestingly enough it seems like it's actually faster with editing RAW files, but that might just be a hallucination).


As far as I can tell, the way darktable works is by creating a sidecar file containing the edits to make to the original JPG file, so in theory the edits are non-destructive (i.e. it's not recompressing the image to JPG every time).


Given all of that, I was curious - is the same JPG file guaranteed to produce the same pixels when rendered each time? For instance, say I have a JPG file that's saved at 98% quality. If I open that at 100% zoom, is it going to have the same pixels when I open it in darktable as when I open it in Google Chrome? Or when you open it in Photoshop? What about files that are at a higher compression, e.g. 50% quality?



Answer





is the same JPG file guaranteed to produce the same pixels when rendered each time?



Yes. It's just a list of numbers that represent color values (in a clever way to make it small). There is no information "produced" in the process of opening a jpeg file that would be different between two applications.



What about files that are at a higher compression, e.g. 50% quality?



Then the numbers in the list will be different. (more zeros) Other than that, there's no difference.


No comments:

Post a Comment

Why is the front element of a telephoto lens larger than a wide angle lens?

A wide angle lens has a wide angle of view, therefore it would make sense that the front of the lens would also be wide. A telephoto lens ha...