This question already has an answer here:
What I mean by "true" resolution is the resolution at which the maximum available amount of real detail is present. For an ideal picture this resolution is the same as the resolution encoded in the image file. However, in other cases the actual true resolution may be less than the resolution of the image file:
If the image file was digitally scaled - for instance, if the camera has a "digital zoom" feature where it upsamples the individual pixels.
If the image is not completely sharp and in focus.
In either of these cases, it is useful to me to have some mechanical method of identifying what the actual true resolution of the image is independent of what the image file says. How can I do this? Is there some software or algorithm which can take an image and analyze it and tell me the highest resolution it can be displayed at while showing detail at the resolution?
My initial naive expectation that it should be "obvious" and easy to determine by some simple mechanism such as compressed sizes is thwarted in cases where the upscaled image has noticable artifacting or noise not present in the original.