Unable to change DPI of JPG image

Ask for help and post your question on how to use XnView MP.

Moderators: XnTriq, xnview

User avatar
fairyhedgehog
Posts: 8
Joined: Wed Oct 28, 2015 4:22 pm
Location: Epsom UK
Contact:

Unable to change DPI of JPG image

Post by fairyhedgehog »

I am using XnViewMP which I have just downloaded and I am running Windows 10.

I have some images from my phone camera that I want to use for printing; the printer (Edited to Add: I should have said "print shop") is asking for 3375 x 2625 pixels at 300 dpi for a page 12" by 8". I have images that are 3984 x 2988 pixels at a resolution of 72 dpi. I understand from this website http://www.rideau-info.com/ that it is possible to change the dpi using XnView, and that this does not affect image quality.

I opened one of the .jpg images in XnViewMp and clicked on image, resize; I unticked resample and set the dpi to 300. I then used save as to save the image again as a .jpg file.

The newly saved image is showing as the same size as the old one but 300 dpi in XnViewMp, but in File Explorer although the size is the same it is showing the dpi as 72.

Could someone let me know what I'm doing wrong, please?
Last edited by fairyhedgehog on Thu Oct 29, 2015 8:46 am, edited 1 time in total.
cday
XnThusiast
Posts: 2801
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Unable to change DPI of JPG image

Post by cday »

Applications usually provide an option to fit an image to the paper in the printer, so rather than change the DPI of the images you wish to print, it might be simpler to use one of the available printer options to obtain the result you need. When the image pixel dimensions are in a different ratio to the paper dimensions an exact fit isn't possible, of course, and alternative options may be offered.

Editing an image file to change the DPI value will avoid any loss of quality due to resampling, but with the pixel dimensions you quote some rescaling seems at first sight to be unavoidable. The DPI value shown in Explorer is clearly incorrect and likely reflects the standard Windows screen default value.

If you have installed XnViewMP, you will find that the File > Print... menu provides quite a number of printing options, although you may have to explore the interface to configure it the exact way you need.

I don't see any reference to XnView software in the link you posted or in that site??
User avatar
fairyhedgehog
Posts: 8
Joined: Wed Oct 28, 2015 4:22 pm
Location: Epsom UK
Contact:

Re: Unable to change DPI of JPG image

Post by fairyhedgehog »

Thank you cday.

The site I linked to refers to XnView on the Changing the DPI page http://www.rideau-info.com/photos/changedpi.html

The problem I have is that the printer I referred to is a person who is going to print a calendar for some of us on a knitting site (Ravelry). It's a bit like the WI calendar in Calendar Girls, only there will be a safe-for-work calendar with mostly cats and wool. The instructions we've all been given include DPI as an essential criteria to meet, otherwise our pictures can't be accepted. My photos meet the necessary pixel sizes so I wanted to make the dpi suitable to be accepted.

I wonder if it's a purely Windows 10 problem because as you say, Windows is reporting the dpi wrongly.
cday
XnThusiast
Posts: 2801
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Unable to change DPI of JPG image

Post by cday »

Thanks for the multiple clarifications!

I'll have a quick look at changing the DPI in XnViewMP, there may possibly have been an issue reported before, but if you're using Windows you could also install XnView 'Classic' and use Image > Set DPI... which should provide a quick fix... :D
User avatar
fairyhedgehog
Posts: 8
Joined: Wed Oct 28, 2015 4:22 pm
Location: Epsom UK
Contact:

Re: Unable to change DPI of JPG image

Post by fairyhedgehog »

Thank you again!

I'm not in any hurry but if using the classic version solves the issue then I might just do that!
cday
XnThusiast
Posts: 2801
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Unable to change DPI of JPG image

Post by cday »

Update:

In XnViewMP it looks as if the DPI adjustment has been incorporated into Image > Resize...

I think the following setting should provide the DPI value you need without any resampling:

XnViewMP_DPI.png
XnViewMP_DPI.png (13.85 KiB) Viewed 2785 times
User avatar
fairyhedgehog
Posts: 8
Joined: Wed Oct 28, 2015 4:22 pm
Location: Epsom UK
Contact:

Re: Unable to change DPI of JPG image

Post by fairyhedgehog »

Thank you.

I've tried that, and it works according to XnView. Unfortunately Windows is continuing to report the lower dpi.

Maybe I'd better just download classic XnView and take it from there!
cday
XnThusiast
Posts: 2801
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Unable to change DPI of JPG image

Post by cday »

fairyhedgehog wrote:I have some images from my phone camera that I want to use for printing; the [calendar] printer is asking for 3375 x 2625 pixels at 300 dpi for a page 12" by 8". I have images that are 3984 x 2988 pixels at a resolution of 72 dpi.
Thinking back to your first post, the 'printer' you are referring to is the printer who is going to print the calendar, rather than the printer attached to your computer!

As the ratio of the pixel width-to-height of your images (1.3333) is greater than the ratio of the width-to-height of the required images (1.2616), either your images will need to be cropped slightly, or distorted slightly to fit the required pixel dimensions, or in principle a combination of the two...

That redefines the problem, and presumably you would choose to crop your images slightly in order to meet the printer's requirements without distorting them?

I'm not immediately sure if there's a simple, direct way of cropping from the centre, if that would be acceptable, and setting the required DPI in one operation?

It is possible to crop an image to a specified pixel size, which could be placed in the optimum position on the image, and then to do the simple DPI change, using other operations if you confirm your requirements, but possibly slightly more easily in XnView 'Classic'.
User avatar
fairyhedgehog
Posts: 8
Joined: Wed Oct 28, 2015 4:22 pm
Location: Epsom UK
Contact:

Re: Unable to change DPI of JPG image

Post by fairyhedgehog »

Yes, I wasn't aware of the confusion over the word "printer" until you replied. Then it seemed obvious to me that "printer" normally means "mechanical device that produces printed papers" but it was a bit late by then.

If I can convince myself that I have a faint hope of producing a picture that might get accepted, then I'll take some proper photos. At the moment I only have "proof of concept photos" i.e. random pictures I can use to check the resolution. I was assuming that the printer will crop any photos appropriately so I'm not going to worry about that.

I really think that I need to try out the classic version of XnView but I'll leave that till tomorrow. I still haven't got used to putting the clocks back and my body thinks it's bedtime!

I'm really grateful for all your help.
cday
XnThusiast
Posts: 2801
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Unable to change DPI of JPG image

Post by cday »

I've had a look and I think XnViewMP is setting the DPI value correctly, I don't know where you are reading the value in Windows?

You had better check with the printer whether images will be cropped to fit after they have been submitted: the way you expressed the requirement they need to be submitted with the stated pixel dimensions and DPI value, although that could be a practical complication for many people...
User avatar
fairyhedgehog
Posts: 8
Joined: Wed Oct 28, 2015 4:22 pm
Location: Epsom UK
Contact:

Re: Unable to change DPI of JPG image

Post by fairyhedgehog »

The pixels and dpi were a benchmark rather than exact as far as I know.

All of this is being filtered through a group of people who know far more about knitting than about image manipulation! It really doesn't help.
cday
XnThusiast
Posts: 2801
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Unable to change DPI of JPG image

Post by cday »

fairyhedgehog wrote:The pixels and dpi were a benchmark rather than exact as far as I know.
3375 x 2625 pixels at 300 dpi looks fairly prescriptive, but small variations in pixel dimensions would likely only result in small variations in the size of the image on the page, and so might be acceptable...
User avatar
foxyshadis
Posts: 387
Joined: Sat Nov 18, 2006 8:57 am

Re: Unable to change DPI of JPG image

Post by foxyshadis »

fairyhedgehog wrote:I then used save as to save the image again as a .jpg file.
If you ever do this, you are seriously affecting the image quality, because that means it decodes, transforms color twice, and then re-encodes similarly but differently. Unfortunately, MP doesn't give you the option. You need a GUI for ExifTools, such as Daminion, ExifTool GUI, pyExifToolGUI, etc, which can directly change any metadata without ever touching the image content.
User avatar
XnTriq
Moderator & Librarian
Posts: 5663
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Unable to change DPI of JPG image

Post by XnTriq »

[quote="xnview ([1.96] Wrong display of DPI in "Thumbnails&Details")"]
johannes.kastl wrote:But why does Xnview display wrong values when no DPI is "set" and this option is not checked, and why the strange value in the properties (Pixel per Inch: ??? x ???)?
JPEG header has DPI info, and EXIF can have DPI too. Sometimes, DPI is only written in EXIF[/quote]
[quote="frobert ([1.96] Wrong display of DPI in "Thumbnails&Details")"]More exactly: It is the optional APP0/JFIF segment that has DPI info, or "pixel densities". A JPEG file may very well contain no resolution information at all and still be compliant with the JPEG standard.
As already said, a second place where resolutions can be found is the optional APP1/EXIF segment. Strictly speaking, JFIF and EXIF are supposed to be mutually exclusive, because both standards wants their segment to be the first one. But in practice, you often find both segments, one of them necessarily in the "wrong" place.
Thirdly, the optional APP13/Photoshop IRB (Image Resource Block) segment has provision for storing resolutions.

Of course, life becomes interesting when two or more of those sources are present and disagree...

Or when a rational values found in IRB (or EXIF) segment has a null denominator... Or a null numerator...

Or when some software try to out-smart the standards : Photoshop used to (still does ?) authoritatively declares 72 dpi for JPEG devoid of any resolution information. Ditto when it deemed the resolution to be too low (<10 dpi IIRC). It also forces the X and Y resolutions to be the same...[/quote]
Ken Watson ([url=http://www.rideau-info.com/photos/printshop.html]What Print Shops Really Want[/url] » A Note to Print Shops and Graphics Designers) wrote:I keep getting emails from poor folk who say that their print shop or graphics designer keep asking for digital photos at ___DPI (usually 300 DPI) without specifying the printed dimensions. Please STOP DOING THIS to your poor clients - ask for what you really need, ____ pixels in your prefered format (i.e. low compressed JPG or a TIF). If your need is for a digital photo that can be printed at high quality at a width of 6 inches, and you think that 300 PPI is what is required to do this (based on your equipment), then you need a digital photo that is 1800 pixels in width (regardless of its DPI setting since it's a meaningless figure). So, ask for a digital photo that is at least 1800 pixels in width. Tell your client not to resize the photo. If the photo is less 1800 pixels, ask them to send it along anyway (so that you can test it) and that if it is larger than 1800 pixels it's also okay (don't have them resize a larger photo down to your "at least" pixel figure). If you are running older equipment/software that needs a particular internal DPI setting, then set it in the photo after you have received it.

My whole "Myth of DPI" section is based on print shops and graphics designers rejecting a perfectly suitable photo because the DPI/PPI setting in the photo is not at 300 (I still receive emails about this). A photo that is 1800 x 2400 pixels in size with a DPI/PPI setting of 72 (the default in most digital cameras) will print to 6" x 8" at 300 PPI. Putting it another way, at 6" x 8" it is a 300 PPI photo (no matter what the internal DPI/PPI setting is). Do not reject these!
User avatar
fairyhedgehog
Posts: 8
Joined: Wed Oct 28, 2015 4:22 pm
Location: Epsom UK
Contact:

Re: Unable to change DPI of JPG image

Post by fairyhedgehog »

foxyshadis wrote:
fairyhedgehog wrote:I then used save as to save the image again as a .jpg file.
If you ever do this, you are seriously affecting the image quality, because that means it decodes, transforms color twice, and then re-encodes similarly but differently. Unfortunately, MP doesn't give you the option. You need a GUI for ExifTools, such as Daminion, ExifTool GUI, pyExifToolGUI, etc, which can directly change any metadata without ever touching the image content.
Thank you. I had no idea what was going on when I used save as. I'll look into those other tools you mentioned.

There's so much I don't know about all this and I'm really grateful for the help.
Post Reply