Jump to content
You must now use your email address to sign in [click for more info] ×

keeping pixel dimensions in integer values when scaling


Recommended Posts

I have the decimal place for unit types on pixel set to 0, and snapping and move by whole pixel on, yet when I rescale images they will not be integer values. Even when changing the width and height to an integer value, and rescaling, it will not be an integer value anymore. This makes it a pain to create an artboard from selection since it keeps adding extra pixels to the sides, as well as adding more pixels to the dimensions when exporting.

Link to comment
Share on other sites

The decimal places set in Preferences are just for display purposes -- internally, the app always uses the maximum precision possible. "Move by whole pixels" will do exactly that, so for example, if the width is currently 800.2 px dragging a handle will be constrained to values of 799.2 px or 801.2 px & so on.

 

Also, if the aspect ratio lock is on in the Transform panel, changing width or height may force the other setting to a fractional value to maintain that ratio.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

23 hours ago, R C-R said:

The decimal places set in Preferences are just for display purposes -- internally, the app always uses the maximum precision possible. "Move by whole pixels" will do exactly that, so for example, if the width is currently 800.2 px dragging a handle will be constrained to values of 799.2 px or 801.2 px & so on.

 

Also, if the aspect ratio lock is on in the Transform panel, changing width or height may force the other setting to a fractional value to maintain that ratio.

So how do you scale while keeping integer values?

Link to comment
Share on other sites

29 minutes ago, Mike018 said:

So how do you scale while keeping integer values?

 

In general, you can’t scale an object in a single operation if you want to keep integer values for its dimensions and maintain the aspect ratio at the same time. For example, if you start with an 8" by 5" rectangle and you halve the long side, that length will become 4", but if the aspect ratio is locked the short side will become 2.5", so you would need to unlock the aspect ratio and truncate or round that value.

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

36 minutes ago, Mike018 said:

So how do you scale while keeping integer values?

There are several things you need to consider for this. As @Alfred said, the most obvious is the mathematics of aspect ratios & scale factors. If multiplying each dimension by the same scale factor on a calculator does not yield integer values, then it won't in Affinity Designer either.

 

Beyond that, you also have to consider stroke widths & their alignment:

5a86b87430957_strokealignment.png.8faef5183f904a28b75d39f58344a0b6.png

All 3 shapes are 10 X 10 px squares, precisely aligned on integer pixel dimensions. But the left one will never align on integer values because its stroke is an odd integer value & it is center aligned.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

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.