Image does not report the same resolution at which it is scanned.

  • Thread starter Thread starter priyamatlani
  • Start date Start date
P

priyamatlani

Hi,
I scan my images in .jpg file format at say 200 dpi.When i check the
jpg file properties i don't get the same value at which the images were
scanned.
I am using .NET code to extract the image properties and use the
System.Drawing.Image class. The HorizontalResolution and
VerticalResolution properties of the Image class report a ppi value of
96 for images scanned at 200 dpi.
When i open these image in Microsoft Photo Editor and check for the
image properties it reports a resolution value of 300 dpi whereas
Microsoft Picture Manager reports a dpi value of 96.
Why do different imaging softwares report different dpi values for the
same image?
How do i get the resolution value at which the images were scanned?

Thanks in advance.
 
Hi,
I scan my images in .jpg file format at say 200 dpi.When i
check the jpg file properties i don't get the same value at
which the images were scanned.

Besides the question why you would attach importance to such a figure,
and it is actually PPI (pixels per inch), that measure only has
meaning when talking about physical (output) media. As long as the
file with an x number of pixels is not output, there is no physical
dimension, there are just pixels.

I assume your scanning software can be instructed to either scan the
original (=pysical output) at a certain sapling density, or it will
scan at such a density (and interpolate in software) to reach a
certain output size.
I am using .NET code to extract the image properties and
use the System.Drawing.Image class. The HorizontalResolution
and VerticalResolution properties of the Image class report a
ppi value of 96 for images scanned at 200 dpi.

96 is probably the approximate output density of pixels on your
screen, the number comes from the screen settings. That number is not
influenced by the sampling density at scan time.
When i open these image in Microsoft Photo Editor and check
for the image properties it reports a resolution value of 300 dpi
whereas Microsoft Picture Manager reports a dpi value of 96.

Since this PPI metric is of so little importance, default placeholder
values are often used if the physical output size in not known.
Why do different imaging softwares report different dpi values
for the same image?
How do i get the resolution value at which the images were scanned?

Again, why would you want to know that? You can use software to look
at the (placeholder?) value in the file header, or change it to
anything you want. Even changing it won't change the number of pixels
you can output at any size you want. It's the number of pixels divided
by the final physical output size that will give the actual PPI for
that size. Change the size, and the PPI metric changes.

Pixels are dimensionless, until output to a physical medium.

Bart
 
Hi,
I scan my images in .jpg file format at say 200 dpi.When i check the
jpg file properties i don't get the same value at which the images were
scanned.
I am using .NET code to extract the image properties and use the
System.Drawing.Image class. The HorizontalResolution and
VerticalResolution properties of the Image class report a ppi value of
96 for images scanned at 200 dpi.
When i open these image in Microsoft Photo Editor and check for the
image properties it reports a resolution value of 300 dpi whereas
Microsoft Picture Manager reports a dpi value of 96.
Why do different imaging softwares report different dpi values for the
same image?
How do i get the resolution value at which the images were scanned?

Thanks in advance.


It sounds like your software procedure to inquire the image dpi value
might be suspect. It doesnt really work that way. Sounds like your
software inquiry is asking about the video system values instead about
of the image file.

When scanners scan an image, they do return the scanning dpi number so
the image can be reproduced same size when reprinted, if desired. There
are some ifs and buts, for example, this number is never saved in a GIF
file format, but is normally always saved in a TIF file format. In a
JPG file format, this number is saved in the optional EXIF tags. It is
possible to omit it in JPG (digital cameras normally do, and Adobe "Save
for Web" option always does, because the dpi number has no meaning in
those contexts). Scanners normally save it, and since one of your
programs sees this 200 dpi number, it obviously must have been saved in
the JPG file in your case. You can verify this by right clicking in the
Windows XP Explorer on the disk file name, then Properties, Summary,
Advanced. That is about the number in the JPG file.

The Windows GDI software procedures include a way to recall dpi numbers
from the video system. However, this NOT the image dpi from the file,
but instead this number is always the "font size" declared in your video
settings, 96 dpi normally, or 120 dpi if large fonts is set, etc. This
number has no actual meaning relating to the screen image. It's sort of
a long story, but see http://www.scantips.com/no72dpi.html (way down the
page at Origin of the Myth, about "logical inches"). This 96 dpi value
is only about sizing fonts (which are dimensioned in inches) on the
video screen (which is dimensioned only in pixels). This number is NOT
about image files.

Bottom line, video screens are dimensioned in pixels, and digital images
are dimensioned in inches. Paper is the exception, being dimensioned in
inches, and so printing on paper needs dpi to size the image right. But
once you read your image into video memory, all you have is pixels.

The video screen has no concept of inches or dpi relating to images.
In video memory, the image is simply dimensioned in pixels. If the
reading software did not save the file dpi value somewhere, then it is
gone. And unneeded, because this dpi number is NEVER needed on the video
screen in any way. Any inches are only when printed on paper. But
screens are dimensioned only in pixels, and all the video software has
or needs is pixels.

Windows GDI does return the value 96 dpi or 120 dpi in those cases. This
96 dpi number is only about font size on the screen, and is your Font
Size setting. It is NOT about your JPG image.
 
Wayne said:
this number is never saved in a GIF
file format, but is normally always saved in a TIF file format. In a
JPG file format, this number is saved in the optional EXIF tags. It is
possible to omit it in JPG (digital cameras normally do

Not so. Digital cameras often save this info. My Fuji saves in jpg and
includes it.
 
Not so. Digital cameras often save this info. My Fuji saves in jpg and
includes it.


OK, but cameras dont "save" it.. some may make it up however :)

Dpi has absolutely no meaning to the digital camera. If your image size
is say 2048 pixels wide, that is the only meaningful number, and nothing
else exists but pixels. The mountain you photograph may be one mile
wide (5280 feet, and 12 inches per foot), but only the 2048 pixel
dimension has meaning (the 2048 / 5280*12 = 0.03 dpi value has no
meaning). The cameras CCD sensor chip might be 5 mm across, but again
the 2048 pixels / (5mm/25.4) inches = 10400 dpi value has no meaning (to
us).

Dpi only has meaning after we decide to print it on paper 6 inches
across, then 2048 pixels / 6 inches = 341 dpi. This does have meaning,
but the camera has no clue what size we might choose to print it.

So cameras didnt store anything for dpi because it was unknown at that
point. Dpi is optional in JPG. Then the photo programs had to make
something up when we asked to see it, and they usually showed 72 or 96
dpi. But this caused absurd printing size numbers like 2 or 3 feet wide
(printing at 72 dpi is pretty absurd too), so some newer cameras are
making up numbers like 180 or 300 dpi, to avoid creating the 2 feet wide
situation. They still have no clue what size we want to print it
however. It is something we must decide later.
 
Drats! Sorry, my serious miswording error ruined the entire point ....
Should have said:

Bottom line, video screens are dimensioned in pixels, and digital images
are dimensioned in PIXELS. Paper is the exception, being dimensioned in
inches, and so printing on paper needs dpi to size the image right. But
once you read your image into video memory, all you have is pixels.
 
Peter D said:
Not so. Digital cameras often save this info. My Fuji saves in jpg and
includes it.
I hope you don't take any landscape images, or your Fuji will have to
record some very low dpi figures, perhaps even dpkm, for the number to
be meaningful. And if you get the night sky in any of your images then
maybe "ppp", for pixels per parsec, would be a better scale. ;-)
 
Wayne said:
OK, but cameras dont "save" it.. some may make it up however :)

The EXIF info. You said, "It is possible to omit it in JPG (digital cameras
normally do"
I'ts part of every picture I take with my A303. Ditto for each and every
digital camera I've used.
 
it.. some may make it up however :)

The EXIF info. You said, "It is possible to omit it in JPG (digital cameras
normally do"
I'ts part of every picture I take with my A303. Ditto for each and every
digital camera I've used.

Hard to imagine that you've never seen a digital camera image that was
reported as being 72 dpi or 96 dpi? Until fairly recently (maybe a couple
of years), this was definitely the norm. Or a JPG image from Adobe
Photoshop or Elements "Save for Web" menu that was reported as 72 dpi? Web
usage has no need for any EXIF data or dpi, it is just more bytes to
download, so EXIF data is omitted by this menu.

The camera did not store the absurd value 72 dpi in the JPG EXIF data. In
these many 72 dpi cases, the dpi number is simply missing from the EXIF data
(dpi being totally unknown to the camera, and without meaning or use to the
camera). A dpi value is used only to print the image on paper, but the
camera cannot know what size we will print the image later. The photo
editor reporting the 72 dpi value just makes it up - it needs to tell you
something, because you asked to see a missing number. When there is no
actual dpi number to report, Adobe and Mac programs tell you 72 dpi, and
most other Windows programs report 96 dpi (for same image file).

Yes, digital cameras normally write EXIF data, but that data does not need
to include fictional printing dpi numbers. However, yes, today many cameras
are guessing a larger dpi value there, to prevent the 72 dpi situation being
reported. My Nikon D70 camera guesses 300 dpi in its JPG images to prevent
a 4 foot wide print being reported, which is too absurd to imagine. 300 dpi
comes out about 10x6.7 inches in this case, but the camera cannot possibly
know I want to print the image at 10x6.7 inches size. Its only purpose is
to just sound so much more reasonable than 42x28 inches :)

A digital camera image simply consists of pixels, and there isnt anything
300 dpi or 72 dpi about it. There is no dimension in inches until the time
that we decide how large to print it on paper, and come up with a new dpi
number to do it. The camera does not know about that situation.

This is true of scanner images too, they are also just pixels. However
scanners do scan paper with an original dimension in inches, and this
original scanning resolution is carried along with the pixels until we
choose to either change it, or to reprint at the original size in inches.
This original size concept is simply not applicable to digital cameras.
 
Wayne said:
Hard to imagine that you've never seen a digital camera image that was
reported as being 72 dpi or 96 dpi?

<sigh> That's not what I said. Once again, I was referring to the statement
that digital cameras normally do (omit the EXIF info in JPGs). Mine don't.
Maybe yours do. Who cares?
 
Agreed, we should drop it.

And I will, except for the record, I did NOT say what you quoted:

I said the opposite about EXIF data - cameras do write EXIF data.

What I said was that cameras had no meaningful way to include dpi values in
that EXIF data. You say some do it anyway, which is correct now, some do,
but there have been very many cameras sold that dont. Until recently,
cameras never included it (dpi value) because future dpi is not known to the
camera, and their guess at some arbitrary dpi value simply is not a property
of the image.

But the photo editor software's 72 dpi fiasco confused novices too much.
Which is not the cameras fault - the cameras were doing it right. It is no
worse that some cameras assign a dummy dpi value, and some do now for the
purpose (my opinion) to disallow showing the unreasonable 72 dpi value, but
that arbitrary dpi value also has no significance.

The human user printing the image is the one that declares dpi,
to fill X inches of paper with the available pixels.
It ain't dpi until the user says so. :)
 
Wayne said:
Agreed, we should drop it.
Agreed.

And I will, except for the record, I did NOT say what you quoted:

Ah, but you did. :-)
That's a direct quote, albeit a smaller one.Unless the context was changed
and thus altered the meaning entirely, it stands. Here's the full quote with
my observed meaning in brackets:

"In a JPG file format, this number is saved in the optional EXIF tags. It is
possible to omit it [the optional EXIF tag?] in JPG (digital cameras
normally do [omit it - the optional EXIF tag?] , and Adobe "Save for Web"
option always does [omit it - the optional EXIF tag?] , because the dpi
number has no meaning in those contexts). Scanners normally save it [the
optional EXIF tag?] , and since one of your programs sees this 200 dpi
number, it [the optional EXIF tag?] obviously must have been saved in the
JPG file in your case. You can verify this by right clicking in the Windows
XP Explorer on the disk file name, then Properties, Summary, Advanced. That
is about the number in the JPG file.

The "it" appears to be " the optional EXIF tag". That's the plain English
reading of the sentences. If you meant the opposite of what you stated
above, no problem. Maybe you can be clearer next time. It's also a bit odd
that you took all the above bessages to clarify. It was clear form my first
and second reply that I had understood you were referring to "the optional
EXIF tag".

<the rest of the restated very useful info deleted>
 
"In a JPG file format, this number is saved in the optional EXIF tags. It is
possible to omit it [the optional EXIF tag?] in JPG (digital cameras
normally do [omit it - the optional EXIF tag?] , and Adobe "Save for Web"
option always does [omit it - the optional EXIF tag?] , because the dpi
number has no meaning in those contexts). Scanners normally save it [the
optional EXIF tag?] , and since one of your programs sees this 200 dpi
number, it [the optional EXIF tag?] obviously must have been saved in the
JPG file in your case. You can verify this by right clicking in the Windows
XP Explorer on the disk file name, then Properties, Summary, Advanced. That
is about the number in the JPG file.

The "it" appears to be " the optional EXIF tag".


The "it" is the "this number" in the first sentence, referring to a dpi value,
which is one of the optional EXIF tags. A dpi value is optional within EXIF,
and the entire EXIF is also optional in JPG files.

Pronouns are never very effective in such cases. :)

I cant tell if we agree or disagree. Maybe we agree, but both just like to
argue. :) But one fact is obvious, that digital cameras have absolutely no
knowledge of the future paper size that the image may or may not be printed
on, so any dpi value from some cameras, or its absence in many cameras, is not
significant either way. An arbitrary dpi number guess has no meaning then,
certainly not to the camera, and not to the user either. The user will
necessarily handle it (dpi) when the image is printed on paper.
 
Wayne said:
The "it" is the "this number" in the first sentence, referring to a dpi
value

Yes, I figured that out after re-reading with that presumed. :-)
Pronouns are never very effective in such cases. :)
Quite.

I cant tell if we agree or disagree.

I think we agree -- that EXIF info is saved with the pic by digital cameras
(not all, dunno if most, for sure with mine) and that dpi isn't saved
(because it's impossible for it to do so).
 
Back
Top