Jump to content

Recommended Posts

Posted

Hi. I found what I think is a scaling bug in Affinity Photo.

What happens: You rescale this larger-than- 1920 x 1080 document down to 1920 x 1080, with proportional scaling in place, and export as a PNG. When you open the PNG, you find it's actually 1920 x 1079.

I can't say I've noticed this before, but I may not have been carefully reading the dimensions of the exported documents.

I'm using the latest version as I type this (2.5.3)

I'm using a 24-inch M1 iMac, 2021
OS: Sonoma 14.5

I have no unusual hardware interfering.

I couldn't make the bug happen consistently from a new document but it does happen consistently with a document of my own. I've attached that document so you can test.

Note, I tried switching M1 Hardware acceleration on and off, and couldn't correlate that to the behaviour happening or not happening.

Steps:

1. Open my attached document
2. Go to File - Export
3. Choose PNG as the filetype to export to, if it's not already chosen
4. Click in left Size box, type 1920
5. Hit TAB to have Affinity drop 1080 into the second box
6. Click Export. Name and save the file
7. Open the file in Affinity or elsewhere. Its X dimensions are 1920 x 1079, for me

trouble-blank.afphoto

Posted

Hello and welcome to the forums, @bloomaff

Must be a Mac problem only. On my Windows machine the exportet file is 1920x1080.

 

MAC mini M4 | MacOS Sequoia 15.5 | 16 GB RAM | 256 GB SSD 
AMD Ryzen 7 5700X | Sapphire Nitro+ RX 9060 XT 16 GB  | 32 GB DDR4 3200MHz | Windows 11 Pro 24H2 (26100.4351)

Windows 11 Pro on VMWare Virtual Machine (on Mac)
Affinity Suite V 2.6.3 & Beta 2.6 (latest)
Interested in a free (selfhosted) PDF Solution? Have a look at Stirling PDF

No backup, no pity.

Posted

Hi @bloomaff and another warm welcome to the forums,

I'm likewise not seeing any issues on Mac...

The Math

Scale Factor = 1,920 / 2,475 = 0.7757575 recurring

Long Side = 2,475 x 0.7757575 = 1,920 px
Short Side = 1,392 x 7757575 = 1,079.854545 px (which Affinity will round up to 1,080 px if using no decimal places)

Affinity Designer 2.6.3 | Affinity Photo 2.6.3 | Affinity Publisher 2.6.3
MacBook Pro M3 Max, 36 GB Unified Memory, macOS Sonoma 14.6.1, Magic Mouse
HP ENVY x360, 8 GB RAM, AMD Ryzen 5 2500U, Windows 10 Home, Logitech Mouse

Posted

I just did a sanity re-run of the experiment and I still got a 1079 output.

I've never touched my decimal point settings, but when I look, I see they're set to 1 decimal place for pixels. I assume that's the relevant one.

I suppose, where Affinity is supplying the proportionally calculated second size value, that the value it placed in there would be the value used. i.e. That rounding would occur in the action of producing the second size value. Am I right in this assumption?    When I do the experiment, Affinity is placing 1080 there, but the outputted file is 1079.

Posted

Hi @bloomaff,

I ran the exported PNG through exiftool which shows 1,920 x 1,080... The same when using the export persona...

Scaling.png.c9e3f141b693590cc039ffb6bfa6ecd1.png

I'm slightly unsure why you're seeing 1,079...

31 minutes ago, bloomaff said:

I've never touched my decimal point settings, but when I look, I see they're set to 1 decimal place for pixels. I assume that's the relevant one

Correct, if you set it to six decimal places what value do you see, technically it should be 1079.854545 px

33 minutes ago, bloomaff said:

I suppose, where Affinity is supplying the proportionally calculated second size value, that the value it placed in there would be the value used. i.e. That rounding would occur in the action of producing the second size value. Am I right in this assumption?

That's correct, Affinity uses the decimal value but will display the rounded version based on the number of decimal places shown...

Could you upload your exported PNG file so we can take a look...

Affinity Designer 2.6.3 | Affinity Photo 2.6.3 | Affinity Publisher 2.6.3
MacBook Pro M3 Max, 36 GB Unified Memory, macOS Sonoma 14.6.1, Magic Mouse
HP ENVY x360, 8 GB RAM, AMD Ryzen 5 2500U, Windows 10 Home, Logitech Mouse

Posted

I can't reproduce using the OP's recipe but...

If I resize the canvas (not the document) to 1920 and hit Tab the height changes to 1079.854545 (which is correct)

I then click the Resize button

But if I then recheck resize canvas (or resize document) the height is 1079

It appears to have rounded down the value rather than up

This may or may not be related to the OP's problem

 

Windows

To save time I am currently using an automated AI to reply to some posts on this forum. If any of "my" posts are wrong or appear to be total b*ll*cks they are the ones generated by the AI. If correct they were probably mine. I apologise for any mistakes made by my AI - I'm sure it will improve with time.

Posted
34 minutes ago, carl123 said:

But if I then recheck resize canvas (or resize document) the height is 1079

Same here, so certainly resizing the canvas itself seems to suffer from a rounding error on Windows, it's fine on Mac when following the OP's recipe, resizing the document or resizing the canvas and then exporting to PNG and fine on Windows when following the OP's recipe or resizing the document, just not when resizing the canvas...

Affinity Designer 2.6.3 | Affinity Photo 2.6.3 | Affinity Publisher 2.6.3
MacBook Pro M3 Max, 36 GB Unified Memory, macOS Sonoma 14.6.1, Magic Mouse
HP ENVY x360, 8 GB RAM, AMD Ryzen 5 2500U, Windows 10 Home, Logitech Mouse

Posted

Okay, here you go.  Exported PNG is attached.

I've been looking at it in Affinity and in Graphic Converter 12, and both give 1079 for the horizontal dimension.

test.png

Posted

Hi @bloomaff,

I take it all back...

Following your recipe I do indeed see the same issue on Mac regardless of the dpi used for the source document, in every case the height is being rounded down to 1,079 px which is incorrect...

Affinity Designer 2.6.3 | Affinity Photo 2.6.3 | Affinity Publisher 2.6.3
MacBook Pro M3 Max, 36 GB Unified Memory, macOS Sonoma 14.6.1, Magic Mouse
HP ENVY x360, 8 GB RAM, AMD Ryzen 5 2500U, Windows 10 Home, Logitech Mouse

Posted

Thanks for your report @bloomaff & our sincerest apologies for our delayed response here!

Testing on Windows, I have only been able to replicate Carls workflow, using Resize Canvas and not Resize Document - in all other tests the exported PNG was 1080px wide:

Testing on macOS, I can see the values are unnecessarily rounded in both the Resize Document / Canvas dialogs (these should remain as 'point' values and only have to be integers when exporting) however in my tests this was always rounded up to 1080, rather than down to 1079:

 

Am I missing something from the workflow to replicate this on macOS please? Or have I misunderstood the report?

I will also be logging the issues I've found already, as the behaviours covered above are not expected, from my understanding.

Many thanks!

Posted

Hi @Dan C,

I see the exact same behaviour as you, the only difference to the exported png dimensions comes from where the dimensions are entered...

This is what I see when editing dimensions in the three different locations...

Windows Method - Exported PNG Dimensions
File Export - 1920 px x 1080 px
Resize Document - 1920 px x 1080 px
Resize Canvas - 1920 px x 1079 px

Mac Method - Exported PNG Dimensions
File Export - 1920 px x 1079 px
Resize Document - 1920 px x 1080 px
Resize Canvas - 1920 px x 1080 px

Affinity Designer 2.6.3 | Affinity Photo 2.6.3 | Affinity Publisher 2.6.3
MacBook Pro M3 Max, 36 GB Unified Memory, macOS Sonoma 14.6.1, Magic Mouse
HP ENVY x360, 8 GB RAM, AMD Ryzen 5 2500U, Windows 10 Home, Logitech Mouse

Posted

Thanks for that @Hangman - I've been able to replicate this on macOS now also!

1 hour ago, Dan C said:

Testing on macOS, I can see the values are unnecessarily rounded in both the Resize Document / Canvas dialogs (these should remain as 'point' values and only have to be integers when exporting) however in my tests this was always rounded up to 1080, rather than down to 1079

I suspect these are intrinsically related issues, as it seems both dialogs are 'rounding' incorrectly with non-integer values, therefore I've logged these with our team separately and linked the issues internally.

I hope this helps :)

  • 2 months later...
  • Staff
Posted

The issue "[Win] Incorrect proportional scale rounding when using Resize Canvas " (REF: AF-4014) has been fixed by the developers in the latest beta build (2.6.0.2805). The fix is planned for inclusion in the next customer release.
Customer beta builds are announced here and you can participate by following these instructions.
If you still experience this problem once you are using that build version (or later) please reply to this thread including @Affinity Info Bot to notify us.

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.