Jump to content

Recommended Posts

Posted

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.

waves.afphoto

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

Posted

Ok, so I found another document where the opposite happens. O.o If I resize it in the Export Settings window, the file is larger compared to resizing prior to export. Afphoto attached below.

pattern1.afphoto

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

Posted

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.

 

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.

 

Posted
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.

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

Posted
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.

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.

 

Posted

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.

 

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.

 

Posted

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.

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

Posted
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. 

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
A
ll 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Posted
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.

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
A
ll 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Posted (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 by NotMyFault

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.

 

Posted

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.

Posted
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.

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
A
ll 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Posted

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.

 

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.

 

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.