Bent U. Posted October 6, 2020 Share Posted October 6, 2020 If you export an image with 96 DPI as PNG, the PNG file has a wrong resolution, namely 96.01 DPI. This makes all my images unusable because I am a software developer and use the images in my software to display them in the GUI. I am dependent on the correct resolution. As long as the error is not fixed, I have to correct the resolution in a different program every time afterwards. This is very annoying. Quote Link to comment Share on other sites More sharing options...
Staff MEB Posted October 6, 2020 Staff Share Posted October 6, 2020 Hi @Bent U., Welcome to Affinity Forums Where are you seeing these dpi values (in what app)? Do you mind attaching a simplified afdesign file from which the exported PNG fails to have proper dpi values please? Thanks. Quote A Guide to Learning Affinity Software | Affinity Quick Reference | Call for Camera Images Link to comment Share on other sites More sharing options...
Jowday Posted October 6, 2020 Share Posted October 6, 2020 2 hours ago, MEB said: Hi @Bent U., Welcome to Affinity Forums Where are you seeing these dpi values (in what app)? Do you mind attaching a simplified afdesign file from which the exported PNG fails to have proper dpi values please? Thanks. I could not get anything else out of Designer than 96.0 in metadata. @MEBWhen I export selection with/without background metadata is not exported even though checked in export settings. Bug? Quote "The user interface is supposed to work for me - I am not supposed to work for the user interface." Computer-, operating system- and software agnostic; I am a result oriented professional. Look for a fanboy somewhere else. “When a wise man points at the moon the imbecile examines the finger.” ― Confucius Not an Affinity user og forum user anymore. The software continued to disappoint and not deliver. Link to comment Share on other sites More sharing options...
Bent U. Posted October 7, 2020 Author Share Posted October 7, 2020 Hi MEB, thanks for your reply. I have attached a sample file. Paint.net is the program I use to correct the resolution (CTRL+R - Resize). There you can also see the wrong resolution of 96,01 DPI. As I said I use my images to build them into my own software and in Microsoft Visual Studio I can also see the wrong resolution when I use the debugger. Unfortunately IrfanView does not help in this case, because it only shows the resolution as integers (horizontal and vertical). Sample_96_DPI.afdesign Quote Link to comment Share on other sites More sharing options...
Move Along People Posted October 7, 2020 Share Posted October 7, 2020 - Quote Move Along people,nothing to see here Link to comment Share on other sites More sharing options...
walt.farrell Posted October 7, 2020 Share Posted October 7, 2020 Exiftool also reports an exported PNG as 96.0. @Bent U.: Could you give us the corresponding exported PNG file, too, please? Move Along People 1 Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. iPad: iPad Pro M1, 12.9": iPadOS 17.1.2, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.1.2 Link to comment Share on other sites More sharing options...
Joachim_L Posted October 7, 2020 Share Posted October 7, 2020 When I export a PNG from AD having 96.2 dpi and open it in PS I get 96.19 dpi. Quote ------ Windows 10 | i5-8500 CPU | Intel UHD 630 Graphics | 32 GB RAM | Latest Retail and Beta versions of complete Affinity range installed Link to comment Share on other sites More sharing options...
Move Along People Posted October 7, 2020 Share Posted October 7, 2020 - Quote Move Along people,nothing to see here Link to comment Share on other sites More sharing options...
Joachim_L Posted October 7, 2020 Share Posted October 7, 2020 Quote ------ Windows 10 | i5-8500 CPU | Intel UHD 630 Graphics | 32 GB RAM | Latest Retail and Beta versions of complete Affinity range installed Link to comment Share on other sites More sharing options...
Bent U. Posted October 7, 2020 Author Share Posted October 7, 2020 16 minutes ago, walt.farrell said: Exiftool also reports an exported PNG as 96.0. @Bent U.: Could you give us the corresponding exported PNG file, too, please? I would like to believe that paint.net is wrong, but the fact is that I can set 96 DPI in paint.net, and then the images are displayed correctly in my software. Quote Link to comment Share on other sites More sharing options...
Move Along People Posted October 7, 2020 Share Posted October 7, 2020 - Quote Move Along people,nothing to see here Link to comment Share on other sites More sharing options...
walt.farrell Posted October 7, 2020 Share Posted October 7, 2020 @Bent U.: Please zip the png file before uploading. (Sorry, I should have mentioned that before. The forum software massages the formats that it supports (PNG, JPG) and can change them, as (I believe) it has when you just posted your .png file.) Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. iPad: iPad Pro M1, 12.9": iPadOS 17.1.2, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.1.2 Link to comment Share on other sites More sharing options...
Move Along People Posted October 7, 2020 Share Posted October 7, 2020 - Quote Move Along people,nothing to see here Link to comment Share on other sites More sharing options...
Joachim_L Posted October 7, 2020 Share Posted October 7, 2020 1 minute ago, haakoo said: I meant the real exported png not the outcome from ps Oh dear, I mixed this discussion up with someone who wanted to export with 96.2 dpi. Nevertheless, when I export 96 dpi document from AD I get 96.0 dpi in xnviewmp and 96.012 dpi in PS. Sorry for the confusion. Quote ------ Windows 10 | i5-8500 CPU | Intel UHD 630 Graphics | 32 GB RAM | Latest Retail and Beta versions of complete Affinity range installed Link to comment Share on other sites More sharing options...
Move Along People Posted October 7, 2020 Share Posted October 7, 2020 - Quote Move Along people,nothing to see here Link to comment Share on other sites More sharing options...
Bent U. Posted October 7, 2020 Author Share Posted October 7, 2020 1 minute ago, walt.farrell said: @Bent U.: Please zip the png file before uploading. (Sorry, I should have mentioned that before. The forum software massages the formats that it supports (PNG, JPG) and can change them, as (I believe) it has when you just posted your .png file.) Sample_96_DPI.zip Quote Link to comment Share on other sites More sharing options...
Move Along People Posted October 7, 2020 Share Posted October 7, 2020 - Quote Move Along people,nothing to see here Link to comment Share on other sites More sharing options...
walt.farrell Posted October 7, 2020 Share Posted October 7, 2020 4 minutes ago, haakoo said: It's an afdesign file @walt.farrell so no (I think) conversion by forum software I asked for (and Brent provided) the .png file just before I asked for the .zip. Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. iPad: iPad Pro M1, 12.9": iPadOS 17.1.2, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.1.2 Link to comment Share on other sites More sharing options...
Move Along People Posted October 7, 2020 Share Posted October 7, 2020 - Quote Move Along people,nothing to see here Link to comment Share on other sites More sharing options...
walt.farrell Posted October 7, 2020 Share Posted October 7, 2020 11 minutes ago, haakoo said: But you rightfully pointed out that forum software may alter common image formats which should not be happening with the already provided afdesign file which contained the original png file which also does show the same results when viewed with xnviewmp No, the .afdesign file can be Exported into a png, but it does not contain the png file. And even if it did, Brent's complaint is about how it was exported, so we need to see the actual exported file. Move Along People 1 Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. iPad: iPad Pro M1, 12.9": iPadOS 17.1.2, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.1.2 Link to comment Share on other sites More sharing options...
Jowday Posted October 7, 2020 Share Posted October 7, 2020 I got the DPI from the metadata in the file read in A file Viewer. Maybe some binary data in the file are different, Quote "The user interface is supposed to work for me - I am not supposed to work for the user interface." Computer-, operating system- and software agnostic; I am a result oriented professional. Look for a fanboy somewhere else. “When a wise man points at the moon the imbecile examines the finger.” ― Confucius Not an Affinity user og forum user anymore. The software continued to disappoint and not deliver. Link to comment Share on other sites More sharing options...
Bent U. Posted October 7, 2020 Author Share Posted October 7, 2020 Okay, I got it. The resolution in PNG files is always stored in pixels per meter, as an integer. 96 DPI corresponds to 3779.5275590551181102362204724409 dots per meter. Affinity Designer saves this as 3780, and paint.net saves 3779. Quote Link to comment Share on other sites More sharing options...
Jowday Posted October 7, 2020 Share Posted October 7, 2020 1 hour ago, Bent U. said: Sample_96_DPI.zip 2.04 kB · 6 downloads <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 5.5.0"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:exif="http://ns.adobe.com/exif/1.0/" xmlns:tiff="http://ns.adobe.com/tiff/1.0/" xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#" exif:PixelXDimension="80" exif:PixelYDimension="22" exif:ColorSpace="1" tiff:ImageWidth="80" tiff:ImageLength="22" tiff:ResolutionUnit="2" tiff:XResolution="96.0" tiff:YResolution="96.0" photoshop:ColorMode="3" photoshop:ICCProfile="sRGB IEC61966-2.1" xmp:ModifyDate="2020-10-07T12:35:36+02:00" xmp:MetadataDate="2020-10-07T12:35:36+02:00"> <dc:title> <rdf:Alt> <rdf:li xml:lang="x-default">Sample_96_DPI</rdf:li> </rdf:Alt> </dc:title> <xmpMM:History> <rdf:Seq> <rdf:li stEvt:action="produced" stEvt:softwareAgent="Affinity Designer 1.8.5" stEvt:when="2020-10-07T12:35:36+02:00"/> </rdf:Seq> </xmpMM:History> </rdf:Description> </rdf:RDF> </x:xmpmeta> Quote "The user interface is supposed to work for me - I am not supposed to work for the user interface." Computer-, operating system- and software agnostic; I am a result oriented professional. Look for a fanboy somewhere else. “When a wise man points at the moon the imbecile examines the finger.” ― Confucius Not an Affinity user og forum user anymore. The software continued to disappoint and not deliver. Link to comment Share on other sites More sharing options...
Bent U. Posted October 7, 2020 Author Share Posted October 7, 2020 Affinity Designer obviously supports 3 decimal places. If I set 95.987 DPI, I get what I need, which is 3779 pixels per meter. Perfect! Thank you all for your efforts. Quote Link to comment Share on other sites More sharing options...
walt.farrell Posted October 7, 2020 Share Posted October 7, 2020 1 hour ago, Bent U. said: Okay, I got it. The resolution in PNG files is always stored in pixels per meter, as an integer. 96 DPI corresponds to 3779.5275590551181102362204724409 dots per meter. Affinity Designer saves this as 3780, and paint.net saves 3779. Interesting. That may help explain one set of numbers that I got which puzzled me, but which I had not yet investigated. PaintShop Pro reported: Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. iPad: iPad Pro M1, 12.9": iPadOS 17.1.2, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.1.2 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.
Note: Your post will require moderator approval before it will be visible.