Loki's mom Posted February 23, 2019 Share Posted February 23, 2019 (edited) Hello all 😁 I would really love some ideas on what's causing this before I lose the rest of my mind...haha. I created original images at 2400 by 3000 pixels, 8 by 10"...and in PNG. I changed the images to JPG to lower the file size for Etsy listings. If I go an reopen a file in paint net, the resolution drops from 300 to 299, and the size goes to 8.03 by 10.03. The pixel size stays correct at 2400 by 3000. I have gone through each of my JPG 3000 images, checking every one, adjusting the resolution back to 300, and the size to 8 by 10 as they were when created. If I open them later on, many of them are back to 299 resolution, and 8.03 by 10.03. I really do not understand this. I need to send customers the 300 resolution for an 8 by 10" size. Can someone please help me..? I don't care if they are PNG or JPG, I just want to be able to send a customer an 8 by 10", 2400 by 3000 pixel, 300 dpi file as they were created. Thank you so much for any help, I do appreciate it! Edited February 23, 2019 by Loki's mom Adding detail Quote Link to comment Share on other sites More sharing options...
Zagna Posted February 23, 2019 Share Posted February 23, 2019 Reproduces, using Irfanview to resave it, paint.net opens the .jpg with 300 resolution. You could use Irfanview to batch process all the original PNG to JPG. Just use paint.net to edit all the .png and then just run a single batch with Irfanview and get .jpg from all of them quickly. 1 Quote Link to comment Share on other sites More sharing options...
HyReZ Posted February 23, 2019 Share Posted February 23, 2019 (edited) As long as the pixel dimensions don't change the image size does not change. Converting from PNG to JPEG can alter image quality is the image is going to re-save as JPEG later (compressing a compressing is like in the old days of coping a VHS tape: each generation of the copy lost video quality). When I open PDN on my computer the default resolution is 96 PPI not DPI (DPI is for printers and printing). 96 PPI is adequate for displaying on most monitors. If for some reason you need to alter the PPI (like making content for smartphone with Retina display screens that have higher resolutions (~420 PPI) than most computer monitors; then change the PDN canvas resolution to 300 PPI before you build your project. I have tried to repeat your steps using the image dimension and resolution that you indicated, but it always saves and opens to the correct file properties. What a mystery indeed! Are you using the PDN app exclusively for all of the steps you have outlined; from creation, to saving, to re-opening? Edited February 24, 2019 by HyReZ Correcting spelling and adding more nfo! 1 Quote Link to comment Share on other sites More sharing options...
Loki's mom Posted February 25, 2019 Author Share Posted February 25, 2019 On 2/23/2019 at 12:33 AM, Zagna said: Reproduces, using Irfanview to resave it, paint.net opens the .jpg with 300 resolution. You could use Irfanview to batch process all the original PNG to JPG. Just use paint.net to edit all the .png and then just run a single batch with Irfanview and get .jpg from all of them quickly. Quote Link to comment Share on other sites More sharing options...
Loki's mom Posted February 25, 2019 Author Share Posted February 25, 2019 Many thanks for taking the time to reply. Very appreciated. I didn't know about being able to convert files in batches, that's very helpful! Quote Link to comment Share on other sites More sharing options...
Loki's mom Posted February 25, 2019 Author Share Posted February 25, 2019 On 2/23/2019 at 7:42 AM, HyReZ said: As long as the pixel dimensions don't change the image size does not change. Converting from PNG to JPEG can alter image quality is the image is going to re-save as JPEG later (compressing a compressing is like in the old days of coping a VHS tape: each generation of the copy lost video quality). When I open PDN on my computer the default resolution is 96 PPI not DPI (DPI is for printers and printing). 96 PPI is adequate for displaying on most monitors. If for some reason you need to alter the PPI (like making content for smartphone with Retina display screens that have higher resolutions (~420 PPI) than most computer monitors; then change the PDN canvas resolution to 300 PPI before you build your project. I have tried to repeat your steps using the image dimension and resolution that you indicated, but it always saves and opens to the correct file properties. What a mystery indeed! Are you using the PDN app exclusively for all of the steps you have outlined; from creation, to saving, to re-opening? HyReZ, hi and thank you so much for your thoughts. I must have messed things up somehow without realizing. The pixels remain the same thankfully. I created a template of sorts with 300 dpi at the proper size to create my images in PDN from scratch, the only thing I can assume is that going from PNG to JPG changed things. I may just need to recreate the images, or try converting back to PNG and see what happens. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted February 25, 2019 Share Posted February 25, 2019 From what I recall, there's actually something of a bug in the way PNG -- and I mean the PNG file format itself -- deals with the EXIF metadata for specifying resolution (dpi / dpcm). It can't actually encode certain integers correctly. If you save a PNG at "96.00 DPI" and then reopen it, then the DPI will actually be lower. I know this because this bug was raised several years ago and I freaked out over it. So I e-mailed with some folks at Microsoft -- because I assumed it was a bug in GDI+ or WIC -- and that's what they told me. It's the PNG file format itself that's broken. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Zagna Posted February 25, 2019 Share Posted February 25, 2019 (edited) 8 minutes ago, Rick Brewster said: From what I recall, there's actually something of a bug in the way PNG -- and I mean the PNG file format itself -- deals with the EXIF metadata for specifying resolution (dpi / dpcm). It can't actually encode certain integers correctly. If you save a PNG at "96.00 DPI" and then reopen it, then the DPI will actually be lower. I know this because this bug was raised several years ago and I freaked out over it. So I e-mailed with some folks at Microsoft -- because I assumed it was a bug in GDI+ or WIC -- and that's what they told me. It's the PNG file format itself that's broken. It's the jpg that opens with the wrong resolution. I doodled a 2400x3000@300dpi image, .png saves as it should. Save a .jpg copy of that with paint.net and it opens at 2400x3000@299. Save a .jpg of the .png with Irfanview and paint.net opens that as 2400x3000@300. Edited February 25, 2019 by Zagna 1 Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted February 25, 2019 Share Posted February 25, 2019 46 minutes ago, Zagna said: It's the jpg that opens with the wrong resolution. I doodled a 2400x3000@300dpi image, .png saves as it should. Save a .jpg copy of that with paint.net and it opens at 2400x3000@299. Save a .jpg of the .png with Irfanview and paint.net opens that as 2400x3000@300. If you save the blank default image at "96" DPI and then reopen it, it'll be at 95.99 DPI Also, original post talked about saving in PNG and stuff. 1 Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
HyReZ Posted February 25, 2019 Share Posted February 25, 2019 (edited) @Zagna and @Rick BrewsterYour info lead me to go back and save the blank default image as both a .jpg and a .png with absolute size turned on and Maintain aspect ratio checked. When I opened the .png with PDN I got the resolution as 95.99 When I opened the .png with MS Paint I got the resolution as 120 When I opened the .png with Irfanview I got the resolution as 96 When I opened the .jpg with PDN I got the resolution as 96 When I opened the .jpg with MS Paint I got the resolution as 96 When I opened the .jpg with Ifranview I got the resolution as 96 The mystery continues@Loki's mom I would suggest that you not worry about it and send your images to Etsy Edited February 25, 2019 by HyReZ 1 Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted February 25, 2019 Share Posted February 25, 2019 Okay I found the info. The original report of PNG DPI "slushing" * : https://forums.getpaint.net/topic/32360-resolution-is-changing-by-01-after-saving-file/ And here's what I got back from Microsoft about the issue back in 2015 (good thing I saved it in the github issue! 😊). It's because PNG saves the resolution as dots per meter and doesn't have enough precision to exactly store values like 96 dots per inch. Quote Hi Rick, thanks for reporting this. See the below message for info about why this is happening. I was able to repro this behavior on Win7 WIC, so it's not a recent regression. It's unlikely that we would be able to fix this in WIC since the API is intended to provide the exact data as stored in the file, and the existence of this behavior for many years. This is still unfortunate since 99% of developers don't want to care about esoteric details of the PNG format. You should consider having code that coerces DPI to integer values. Thanks, Simon From: Simon Tao Sent: Monday, October 26, 2015 3:40:39 PM To: Dwayne Robinson; Jeff Bloomfield Subject: Re: Unstable DPI save/load bug in WIC, 96.00 -> 95.9866 -> ... Thanks for forwarding this Dwayne! The PNG format actually doesn't store dots per inch, it stores dots per meter, and it stores this value as an integer: http://www.w3.org/TR/PNG/#11pHYs You can guess the inevitable tragic result 😊. WIC accepts DPI and internally converts to dots per meter, 96 / 2.54 * 100 = 3779.5275...sounds like we are rounding down or truncating. When you read back 3779.0 * 2.54 / 100 = 95.9866. Alternatively, if we round up we would save as 3780.0 * 2.54 /100 = 96.012. I don't think WIC should be adjusting for this because we are "just" reporting what the file format has. But I don't know what guidance we've given to app developers in the past. It'd be interesting to see if previous versions of Windows have the same issue. * new word I just made up 1 Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
HyReZ Posted February 26, 2019 Share Posted February 26, 2019 (edited) On 2/24/2019 at 10:46 PM, Loki's mom said: HyReZ, hi and thank you so much for your thoughts. I must have messed things up somehow without realizing. The pixels remain the same thankfully. I created a template of sorts with 300 dpi at the proper size to create my images in PDN from scratch, the only thing I can assume is that going from PNG to JPG changed things. I may just need to recreate the images, or try converting back to PNG and see what happens. My earlier advise to still holds true. I suggest that you not worry about any of this as long as your images are at 2400 x 3000 PPI. DPI is not relevant until the image is printed. Printers print in dots; monitors and image sensors use pixels as a reference and therefor PPI. If you want to use image compression software to reduce file size, that is okay; it does not reduce image size, so all is well. An image produced at 2400 x 3000 PPI and set to a viewing resolution from 150 - 300 PPI will print just fine when the printer software is set to print to an 8x10. I print most of my images to dimensions no smaller than 13 x 19 inches at image sizes of 1920 x 1440 pixels at 96 PPI. Only last year did I start making images with its smaller dimension being 5000 pixels. I used to run a HP Design Jet 500 in my class room and for inhouse school print projects. It is a great CMYK printerhttps://youtu.be/-Zt2yDVlB30 In Paint.NET the resolution in the resolution box is measured in pixel/inches or pixel/centimeters although most people say 'DPI'; even its creator!?http://www.rideau-info.com/photos/math.html https://en.wikipedia.org/wiki/Pixel_density Edited February 26, 2019 by HyReZ to add more nfo 1 Quote Link to comment Share on other sites More sharing options...
Loki's mom Posted February 27, 2019 Author Share Posted February 27, 2019 (edited) Holy cow YES you guys NAILED it. Thank you so much for taking the time to add your replies! I am grateful and relieved to know about this! I personally wouldn't care about losing that 1 or 2 pixels of information in the file properties of my images, but customers are a different matter, if I say this thing is 300 dpi and they see 297 or so then they will leave bad reviews thinking they aren't getting what they paid for. Thank you Rick, slushing! lol. I never heard of dots per meter! Zangna for also confirming what's been going on. I am totally looking into Irfanview to resize my next batch of images. Thank you so much. Thank you HyRez, I appreciate your testing! I was feeling pretty demoralized thinking I messed up almost 3000 images. lol. Knowing it's just a little glitch feels great. You all made my day. 👍 👍👍 Edited February 27, 2019 by Loki's mom 1 Quote Link to comment Share on other sites More sharing options...
HyReZ Posted February 27, 2019 Share Posted February 27, 2019 That fact is that you have not lost anything. Your images are still 2400 x 3000 pixels. I hope that you took the time to view the links that I provided. Most people are confused about the process. Just think that the image sensor in a digital camera is the size of a postage stamp, yet it can produce a 16 megapixel (~4920 x 3264 pixel) image and that image data can be processed for viewing on a smartphone, computer monitor, 80 inch TV screen, or poster with pretty good resolution. Producing an 8x10 print is relatively simple. Good Luck! Quote Link to comment Share on other sites More sharing options...
Bloopy Posted October 10, 2021 Share Posted October 10, 2021 I just ran into this problem. I'm working with 16-bit colour maps that contain 65,536 distinct colours. My original BMP shows a DPI of 95.99 when opened in Paint.NET. I then save it as PNG, and when I open it again, Paint.NET shows 95.96. So far so good, the image still works for my purpose. However, I ran into trouble editing the PNG and saving it again as then the DPI drops further to 95.94. I didn't know that was happening, so didn't realise that when I loaded the image with Microsoft's System.Drawing namespace, the image was getting slightly resized and smoothed a bit, giving me only 45,874 distinct colours in the colour map. So there's definitely a chance for something to be lost here if people aren't aware that this happens and don't realise they may need to compensate for it when using other applications. I think Paint.NET needs to apply a small adjustment to offset the drift. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.