Alex_M Posted April 16, 2022 Posted April 16, 2022 There's something very peculiar I just found out. I have a document which If I resize prior to export, the exported image is quite a bit larger in file size compared to resizing it in the Export window. All quality settings are the same. When I open and compare both files, they look the same to me, no visible quality difference. The format I export to doesn't seem to matter. I tested PNG and JPG and they both exhibit this issue. Why does this happen? Please check the AFPHOTO file and the video I recorded. same_resolution_different_file_size.mp4 waves.afphoto Quote Aleksandar Mitov www.renarvisuals.com CGI and 3D rendering services email: office@renarvisuals.com Affinity Photo 2.6.3 ◾ Windows 10 Pro x64 ver. 22H2 ◾ AMD Ryzen 9950X 16-core + 96 GB DDR5 ◾ GeForce RTX 5090 32GB + driver 572.83
Alex_M Posted April 16, 2022 Author Posted April 16, 2022 Ok, so I found another document where the opposite happens. If I resize it in the Export Settings window, the file is larger compared to resizing prior to export. Afphoto attached below. pattern1.afphoto Quote Aleksandar Mitov www.renarvisuals.com CGI and 3D rendering services email: office@renarvisuals.com Affinity Photo 2.6.3 ◾ Windows 10 Pro x64 ver. 22H2 ◾ AMD Ryzen 9950X 16-core + 96 GB DDR5 ◾ GeForce RTX 5090 32GB + driver 572.83
NotMyFault Posted April 16, 2022 Posted April 16, 2022 If you resize before exporting, you will use bicubic resample twice. If you resize at export, you resample only once. The exported files are visually similar, the actual pixel values differ numerically. So i assume the root cause is that bicubic resampling will alter the pixel content even if the resolution stays the same. 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.
Alex_M Posted April 17, 2022 Author Posted April 17, 2022 22 hours ago, NotMyFault said: If you resize before exporting, you will use bicubic resample twice. If you resize at export, you resample only once. In both cases I resized the image only once - either in the Resize Document window or in the Export Settings window. Quote Aleksandar Mitov www.renarvisuals.com CGI and 3D rendering services email: office@renarvisuals.com Affinity Photo 2.6.3 ◾ Windows 10 Pro x64 ver. 22H2 ◾ AMD Ryzen 9950X 16-core + 96 GB DDR5 ◾ GeForce RTX 5090 32GB + driver 572.83
NotMyFault Posted April 17, 2022 Posted April 17, 2022 Just now, Alex_M said: In both cases I resized the image only once - either in the Resize Document window or in the Export Settings window. Yes, but Affinity might apply resampling even if export has the same dimension. Why? The document could contain pixels outside the visible canvas, and depending on layer dpi these pixels might influence the export after resampling. 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 April 17, 2022 Posted April 17, 2022 I tried yesterday on Mac and got the size discrepancy. Today on iPad i get only the smaller size. Seems to be a Mac issue. 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.
Alex_M Posted April 18, 2022 Author Posted April 18, 2022 I'm on Windows. Also, there are no pixels outside the canvas in my files. Not sure why this would inflate the file size though given that for JPG and PNG Photo exports only what's inside the canvas. Quote Aleksandar Mitov www.renarvisuals.com CGI and 3D rendering services email: office@renarvisuals.com Affinity Photo 2.6.3 ◾ Windows 10 Pro x64 ver. 22H2 ◾ AMD Ryzen 9950X 16-core + 96 GB DDR5 ◾ GeForce RTX 5090 32GB + driver 572.83
R C-R Posted April 18, 2022 Posted April 18, 2022 3 hours ago, lacerto said: When you resample the image beforehand (using Document > Resize Document), the procedure will produce transparent pixels (no idea why), which you can verify by using e.g. the Info panel or Curves adjustment. I may not be doing that correctly or checking it correctly but when I try that on the OP's waves.afphoto file, I do not seem to be getting any either partially or fully transparent pixels. Quote All 3 1.10.8, & all 3 V2.6 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7 All 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7
R C-R Posted April 18, 2022 Posted April 18, 2022 7 minutes ago, lacerto said: You need to follow the example of the video when trying to reproduce OP's problem: use Bicubic resampling method when resizing the document. It does not happen if you use other than Bicubic or Lanczos 3 (separable). OK. I see that too ... now that I know it depends on the resampling method. That was not clear until you mentioned it in your last post. Quote All 3 1.10.8, & all 3 V2.6 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7 All 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7
NotMyFault Posted April 18, 2022 Posted April 18, 2022 (edited) Getting partial alpha by resample is the actual bug. I didn't get that on iPad. So platform dependent bug (Mac and Win). This issue happens for all GREY/8 layers when resizing with bicubic. Does not happen for RGB/8 Edited April 18, 2022 by NotMyFault 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.
iconoclast Posted April 18, 2022 Posted April 18, 2022 As I tested it, I got exactly the same file size. It seems to be important that you set the background to "White", also in the Export dialog (under "More") in both cases. Otherwise you get an additional channel - the Alpha channel - that causes the bigger file size, I think. That's at least my explanation for what might have happened. Quote
R C-R Posted April 18, 2022 Posted April 18, 2022 48 minutes ago, lacerto said: It was however clear from the OP's initial video (and discussion thereafter). It was not clear to me from the initial video, possibly because it only used Bicubic ... unless I missed that too. Quote All 3 1.10.8, & all 3 V2.6 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7 All 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7
NotMyFault Posted April 19, 2022 Posted April 19, 2022 For me it seems just another rounding issue for 8 bit color depth, we had similar in multiple other situations ( blend mode leading to white instead of yellow, iPad unable to reach full white by brush). Bicubic resample (with resize) creates about 1/3rd of the pixels with wrong alpha of 254/255 instead of 255/255. The content of the images does not matter, you could resample any fully opaque layer in GREY/8 and get the from alpha values. 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.
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.