Skip to main content
Participating Frequently
January 13, 2016
Question

96 DPI image gets reset to 96.012 on save

  • January 13, 2016
  • 5 replies
  • 10868 views

I have a png image (many of them actually) that were given to me in the right pixel size but set at 72dpi.  They need to be 96dpi as they are for use in a program and WPF seems to care and tries to scale them if they are not 96 to start.  I figured that's an easy fix, created a quick action to change to 96 and ran in batch on the folder.  Everything ran fine, but when I open them they are all 96.012dpi.  I tried doing it manually on one of them and I can set it to 96 exactly, and when I go back into it, it's still set to exact 96.  However when I save, close, and reopen the file it's back to 96.012.  I know it doesn't seem like it would make much difference but if it's not exactly 96 WPF will try to scale it and it ends up with some blurring on the edges, etc.

What can I do to set the images as 96 exactly and why won't it stick?

This topic has been closed for replies.

5 replies

Inspiring
January 13, 2016

In which context is this deviation of 0.012/96 = (about) 10 to the power of minus 4

anywhere of any relevance for building a page?

Best regards --Gernot Hoffmann

Participating Frequently
January 13, 2016

I know, it's miniscule, but it's triggering WPF to rescale the image and make the edges fade.  To prove my point, here is the original image zoomed in:

and here is a screen capture from the program where the icon is used:

Participating Frequently
January 13, 2016

I don't think that's it.  I changed the canvas size to 96x48 pixels which is easily divisible by 96 (1 inch by 1/2").  I then went back to image size and set it to 96dpi exactly and after save and reopen it still goes back to 96.012...

Here is one of the images if it helps anyone (not sure if that's the best way to attach it here...).

Theresa J
Community Expert
Community Expert
January 13, 2016

That is really odd. Where are you reading 96.012 ppi? This is what I see in the PS image size dialog.

Participating Frequently
January 13, 2016

I'm on CS5, but here is the image size dialog for the original pixel size:

and here is after I change the pixel size to make it divisible:

Participating Frequently
January 13, 2016

And yes I resized with resample unchecked.  Actually tried both ways with the same result...

postrophe
Inspiring
January 13, 2016

Hi

... they are for use in a program and WPF seems to care and tries to scale them...

When you say WPF, what do you mean exactly ?


Pierre

Trevor.Dennis
Community Expert
Community Expert
January 13, 2016

postrophe wrote:

When you say WPF, what do you mean exactly ?

Pierre

I thought it was a typo, but P is not near enough to T on the keyboard for that to work.

Theresa is on the right track I reckon.  Resize was given some impossible math to contend with, and had to compromise.  Those pesky pixels can really get in the way sometimes.

Theresa J
Community Expert
Community Expert
January 13, 2016

Did you resize them with resample turned on or off? It's best to change the resolution and not resize the image. You do this by unchecking the resample box.

The images are changing to 96.012 because the print size is not equally divisible by 96 pixels.