DavidP Posted Friday at 02:57 PM Share Posted Friday at 02:57 PM (edited) Hello Community, I've encountered a persistent problem with PNG files created in and saved from paint.net. When these PNG files are inserted into documents such as Word or PDF, they appear significantly darker than the original image. After some investigation, I found the issue is related to a gamma value that paint.net seems to be writing into the PNG files by default. My observations: This darkening effect occurs consistently with PNG files created in paint.net. The same images, when converted to other formats like TIFF or JPEG, do not exhibit this problem. The issue persists across different versions of Word and various PDF readers. To further illustrate this issue, I've conducted a more detailed analysis: Here is an analysis of an original PNG file created and saved directly from paint.net. The image is shown below. Here is an analysis of the same image, first saved as TIFF from paint.net, then converted to PNG using external software. The first file (direct PNG from paint.net) exhibits the described problem of appearing too dark when inserted into Word or PDF documents. In contrast, the second file (TIFF to PNG conversion) appears perfectly fine after insertion in such documents. This demonstrates that the issue lies within the PNG file creation process in paint.net, rather than with the image data itself or the insertion process in Word or PDF software. The above-linked analysis by ExifInfo shows that the root cause is a gamma value (of 2.8985) being written into the PNG file metadata by paint.net. This gamma value is apparently not being interpreted correctly (or not as intended) by Word or PDF software, resulting in the darker appearance. My questions for the community and developers: Is there a way to prevent paint.net from writing a gamma value into PNG files upon saving? If not, could this feature be considered for future updates? Perhaps as an optional setting when saving PNG files? Are there any workarounds within paint.net to mitigate this issue? I understand that gamma correction can be beneficial for image quality in many cases. However, for my specific workflow, it's causing more problems than it solves. Any insights, suggestions, or potential solutions would be greatly appreciated. Thanks @all for your time and assistance. Best regards, David Edited Friday at 03:01 PM by DavidP typo Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted Friday at 09:18 PM Share Posted Friday at 09:18 PM Can you share the images themselves? I tried downloading the images you posted but they're saving as WebP for some reason. Maybe attaching them in a ZIP file would help. I haven't been able to reproduce this issue on my own yet; I see the gamma being written as 2.2*, which is the correct value. * the value in the gAMA metadata is actually 45455 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...
DavidP Posted Friday at 09:42 PM Author Share Posted Friday at 09:42 PM (edited) Sure, here are the original files! Thanks for looking into it. Could it be that the reason for the problem is that the image was originally taken from a PDF by calling paint.net directly from within the PDF software? I've added that original image as well to the attached zip folder. Sample image versions.zip Edited Friday at 09:55 PM by DavidP adding stuff Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted Saturday at 12:31 AM Share Posted Saturday at 12:31 AM For the image, "Sample image created in paint.net and saved as PNG", it's not actually clear to me that it was indeed saved by Paint.NET. It does not have the metadata stating what software created it, and it has a color profile attached to it called "opRGB" aka Adobe RGB (1998). If a PNG is saved by Paint.NET then it will definitely have the creation software metadata. So whatever actually created that PNG is doing something weird, particularly because the gamma value for Adobe RGB (1998) is the standard 2.2, not 2.8whatever. Paint.NET never specifies a gAMA value when saving a PNG, nor does it even read the value from the metadata. There's only a few bits of PNG metadata that are supported, and one of those is the color profile. In PDN v5.0 the color profile isn't used by PDN, and there is no mechanism for specifying it. In v5.1 you can do that though. So one thing you can try is to install the latest PDN v5.1 beta and see if things change. 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...
DavidP Posted Sunday at 09:42 PM Author Share Posted Sunday at 09:42 PM OK, the original image was taken from a PDF the way linked above. Then a layer was added, and after some editing in Paint.NET, it was saved as PNG. Anyway, I will try and repeat this with the latest beta version and report back any findings. 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.