Photoshop fails to read DPI correctly from file

  • 1
  • Problem
  • Updated 2 years ago
Hello,

Having scanned a picture using Apple's Image Capture programme at 600 DPI (CanoScan LiDE 700F), Photoshop reports only 72 DPI (which appears to be Photoshop's default value) after loading the respective JPEG file. In Apple's own Preview programme, 600 DPI are reported in the Inspector as expected. Apparently, the information is in the file, but Photoshop fails to read it.

A sample file is attached (hoping that the forum's software does not alter the meta-data) with which the behaviour can be reproduced.

Let me add that Photoshop lacks a serious (= professional) bug reporting feature. I consider it rather pointless to open a discussion in this case for obvious reasons.

Cheers,
Jakob

Photo of Jakob Vogel

Jakob Vogel

  • 13 Posts
  • 0 Reply Likes

Posted 2 years ago

  • 1
Photo of Theo-Charl Kieck

Theo-Charl Kieck

  • 3 Posts
  • 1 Reply Like
to what file type did you save it??
Photo of Jakob Vogel

Jakob Vogel

  • 13 Posts
  • 0 Reply Likes
JPEG
Photo of Theo-Charl Kieck

Theo-Charl Kieck

  • 3 Posts
  • 1 Reply Like
Bit strange just did a test here and I don't get that problem is your PS updated? try a new scan. as for the bug report I agree.
Photo of Jakob Vogel

Jakob Vogel

  • 13 Posts
  • 0 Reply Likes
Thanks for your troubles. I appreciate this very much.

Yes, PS (and all other installed components of CC) are updated to the latest version. Also, it does not happen for every scanned file, but it does happen regularly. So far, I have seen this behaviour for several dozens of scans and two different scanners of the same type, but I could not yet find any particular pattern. I have the feeling that it occurs more often for higher DPI values. It appears that Image Capture or Canon's TWAIN driver produce slightly different meta data from time to time.

But again, whatever may cause the different files, Apple's Preview is able to read the DPI correctly in every case. Likewise, a Java-programme written by myself (using 'official' image i/o libraries coming with the runtime environment) also reads the DPI correctly every time. So, it's probably really just PS, and I guess that one of Adobe's devs needs to get the sample file from me and check it with a hex editor. ;)
Photo of Jakob Vogel

Jakob Vogel

  • 13 Posts
  • 0 Reply Likes
Well, the sample file is obviously modified during posting. Please contact me directly for the original file if necessary.
Photo of Paddy Boocock

Paddy Boocock

  • 44 Posts
  • 10 Reply Likes
Loads as 600 DP here.
Image is blank white box 472 x 472 pix
Photo of Jakob Vogel

Jakob Vogel

  • 13 Posts
  • 0 Reply Likes
Thanks four your troubles.

Yes, the image only shows a white box (there was nothing in the scanner). It's really only about the DPI value. However, as I wrote in the comment above, the file was obviously modified during posting and the meta-data was cleaned up. (Obviously, the forum software uses better parsing routines... :)) Consequently, PS loads the file downloaded from this website correctly.

If you want to try again, I have put the original file to my dropbox: https://www.dropbox.com/s/ldl43cq4hb71ebj/600dpi.jpeg?dl=1
Photo of Jakob Vogel

Jakob Vogel

  • 13 Posts
  • 0 Reply Likes
After opening the unmodified file (from Dropbox) on my system,...

...Apple's Preview gives this:


...and PS gives this:


Curiously, PS even gives the correct DPI values in the File Info, but that information fails to 'propagate' to the Image Size dialogue:
(Edited)
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2584 Posts
  • 323 Reply Likes
I'm wondering if it has to do with whether the image can fit on-screen at 100% zoom with the default PS PPI or not.  In this case the image is only 472 pixels so it can easily fit at 72PPI.  A larger image that needs zoomed out to fit might use another PPI in the Image Resize operator.
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2586 Posts
  • 323 Reply Likes
Using the 600dpi.jpg downloaded from the dropbox link, on Windows 10, PS CC 2015.5 shows 600 as the Resolution in the File Info panel, but is defaulting to 72 PPI in the Image [Re]Size operator.  I'm not sure the Image Resize is supposed to always use the document's PPI is it?  



(Edited)
Photo of Jakob Vogel

Jakob Vogel

  • 13 Posts
  • 0 Reply Likes
Thanks, Steve!

The problem – independent of the Image Size dialogue – is that the 72 DPI will be written to the file if you save it from PS. I guess the problem is that there are different standards for writing meta-data to an image file (like EXIF, or 'ordinary' format-dependent properties), and PS only picks one of them. If a field is missing in this set, the value will be considered as blank, even if it is available in a different standard. (I mean, I would not mind a default value if the values were conflicting, but they are not really in this case.)

(My guess would be this: PS parses the file, finds an EXIF record, realises that there is no resolution information there, and defaults to 72 DPI. The fact that the value is missing in the EXIF record is the 'fault' of Apple or Canon. However, the real value is also in the TIFF properties record that the file also still carries along, and it is the 'fault' of PS to ignore the additional properties. So, I think that PS should merge the meta-data of all kinds into some common dictionary – if necessary prompting the user to manually fix conflicts – and read the properties to use for measuring/processing/saving – let's call them 'internal values' – from this joint meta-data record only then.)

And yes, I expect PS to respect the resolution. :) I often use PS to rotate/straighten/crop scans of old documents which I have made in archives of other people. (Hence the portable scanner which may not necessarily produce optimal images.) There are plans and blueprints among the image files, and I need to be able to take measurements from the scans. Of course, I will realise if the resolution is considerably off (like 72 instead of 600 DPI), but I would prefer to keep the real data, of course.
(Edited)
Photo of Paul Riggott

Paul Riggott

  • 346 Posts
  • 131 Reply Likes
It could be due to the fact it does not have a resolution unit.
http://www.awaresystems.be/imaging/tiff/tifftags/resolutionunit.html
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2584 Posts
  • 323 Reply Likes
I should add that if I hex-edit the file to have a 01 instead of a 00 for Resolution Unit, PS File Info shows 600.00 Pixels per Inch and the Image Size operator has 600 instead of 72 for the PPI value.

The scanner should be putting 01 for PPI or 02 for PPcm not 00 for None.
Photo of Jakob Vogel

Jakob Vogel

  • 13 Posts
  • 0 Reply Likes
Thanks, Steve. I was only considering TIFF and EXIF tags, as Paul identified the ResolutionUnit field. I was too lazy for the hex part, and I am grateful that you analysed the file. (It is interesting to see the priority given by PS to the different entries.)

I still believe that PS should handle this case (values without unit) differently. There is probably hardly a way to "set (...) scanner software" to do something specific unless an option is explicitly provided, and PS should provide the error tolerance allowing to recover from the situation. However, I do not believe that everyone will agree here (nor is there any need to agree, of course.)

So, thanks again everyone.
Photo of Jakob Vogel

Jakob Vogel

  • 13 Posts
  • 0 Reply Likes
Thanks, Steve. I was only considering TIFF and EXIF tags, as Paul identified the ResolutionUnit field. I was too lazy for the hex part, and I am grateful that you analysed the file. (It is interesting to see the priority given by PS to the different entries.)

I still believe that PS should handle this case (values without unit) differently. There is probably hardly a way to "set (...) scanner software" to do something specific unless an option is explicitly provided, and PS should provide the error tolerance allowing to recover from the situation. However, I do not believe that everyone will agree here (nor is there any need to agree, of course.)

So, thanks again everyone.
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2584 Posts
  • 323 Reply Likes
The 72 PPI is coming from PS / Prefs / Units & Rulers - Screen Resolution. 

If you always scan at 600 DPI just change the default, there.

That preference is also used for when you paste something from the clipboard or place another document where either doesn't have complete pixel-density information, so it depends on whether most of your messed up documents are scanned at 600dpi or pasted/placed with a different value needed for resolution.
Photo of Johan Elzenga

Johan Elzenga, Champion

  • 1044 Posts
  • 398 Reply Likes
Another simple option is to make an Action that uses the Resize box to set the ppi (not dpi) to 600 ppi. Don't forget to turn off 'Resample Image'. One click on that action (set your Action panel to Button mode) will make sure your file has the desired ppi value.