Helianthropy Posted December 9, 2023 Posted December 9, 2023 Affinity Photo Latest release, 2.3.0 Issue can be reproduced in Photo 2 and in Photo 1.10.1 This happens for a new document. If you cannot provide a sample document then please give an accurate description of the problem for example it should include most of the following: macOS 14.1.1 Hardware acceleration is enabled When exporting a PNG with transparent background, switching to indexed PNG results in any partially transparent pixels becoming entirely transparent. Expected some opacity to remain. For images with partial transparency throughout, the image effectively disappears. Acceptable solution would be to provide a slider to adjust cut off. Create a transparent document. Add a stroke or shape with 99% opacity or less. Export to PNG. Switch to indexed color in Export dialog window. Examples: 24-bit transparency: 8-bit Transparency: No unusual hardware, able to replicated on external display and internal display. Looks like this may never have worked. PNG Transparency.afphoto Quote
NotMyFault Posted December 9, 2023 Posted December 9, 2023 Can you please provide screenshots of the exact export settings used for the examples? I don’t fully get what you mean by 24 / 8 bit transparency. from the description I assume you are using palettised export with a small set of colors, and this may apply palettising on alpha Chanel unwantingly. As you example contains no actual color at all and only varies over alpha channel it is a bit tricky to reproduce from the description. Quote Mac mini M1 A2348 | MBP M3 Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080 LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K iPad Air Gen 5 (2022) A2589 Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps. I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.
NotMyFault Posted December 9, 2023 Posted December 9, 2023 Ok, using a gradient with pure blue, but transparency from 100% to 0% you can see that only fully opaque pixels get included into palettised PNG export, no matter how many colors you choose. (256, 128, … 2) and no matter which document / pixel format is used (RGB-8, RGB-16). Quote Mac mini M1 A2348 | MBP M3 Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080 LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K iPad Air Gen 5 (2022) A2589 Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps. I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.
NotMyFault Posted December 9, 2023 Posted December 9, 2023 Do you have a text PNG image using palettized and having a gradient over alpha, created by a different app, so we can check: it is possible how these files get imported into Affinity Quote Mac mini M1 A2348 | MBP M3 Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080 LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K iPad Air Gen 5 (2022) A2589 Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps. I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.
Helianthropy Posted December 11, 2023 Author Posted December 11, 2023 Apologies on the confusion of the examples, I meant 8-bit indexed versus non-indexed color with transparency enabled on both. But yes, it doesn't matter how many colors for indexed output. Per this thread, here is an indexed color PNG file with multiple levels of transparency. I am not advocating for this level of variable transparency on indexed color files since it isn't guaranteed to be supported everywhere, but rather for a higher threshold for a pixel to be considered transparent, and as a feature request, that this threshold be configurable via slider. Quote
NotMyFault Posted December 11, 2023 Posted December 11, 2023 Thank you for providing this link. At least the file opens correctly, but you cannot re-export with palettised option. It seems it is a feature rarely supported by competing apps, and there are more severe unfixed bugs (or missing features) for png export: palettised exports in general (using postierizing even when not required) custom palette for export not implemented since V1 32767 size limit for export Quote Mac mini M1 A2348 | MBP M3 Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080 LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K iPad Air Gen 5 (2022) A2589 Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps. I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.
Dan C Posted December 11, 2023 Posted December 11, 2023 Thanks for your report @Helianthropy! As you've mentioned, I don't believe Affinity currently supports exporting palettised PNGs with partial transparency - however I can certainly understand why this would be beneficial to your workflow and therefore I've logged this with the team to be investigated and considered for a future update. I hope this helps Quote
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.