Jump to content

Recommended Posts

Hello gang

Am using Affinity Designer in Window 10 & have a page saved to create several small 440px x 220px images (see image a)

When i go to file/export, then selection without background to export each individual image as a png the size comes up as size 441px x 221px (image b)

It's not a huge problem to change of course, but does anyone know why?

Regards

Pete

Image a.jpg

Image b.jpg

Share this post


Link to post
Share on other sites

I’m fairly sure this is because you have the X and Y positions of the image set to fractions of a pixel.
If you remove the fractional parts it should be sorted.
I have no idea why this happens but someone else might.

Share this post


Link to post
Share on other sites

You’re welcome.
You can set Force Pixel Alignment and Move By Whole Pixels (on the toolbar) but that doesn’t always work as snapping seems to override these and any pre-existing fractional measures are kept as-is. However, turning snapping off should let these work fine, as long as you have these settings on before you place your image.

Share this post


Link to post
Share on other sites

It happens in other software too. It's because if you take a one pixel line and position it half a pixel to the left (the fractional part of the position) it needs to now render that across two pixels (it will most likely do two half opacity lines instead of one full opacity line), to make it look like that's where it is sat. It's called antialiasing and is the whole reason the 'snap to pixel' style constraints exist.

Share this post


Link to post
Share on other sites
56 minutes ago, GarryP said:

You can set Force Pixel Alignment and Move By Whole Pixels (on the toolbar) but that doesn’t always work as snapping seems to override these and any pre-existing fractional measures are kept as-is. However, turning snapping off should let these work fine, as long as you have these settings on before you place your image.

Move By Whole Pixels does exactly what it says it does, which is to force every move to change by a whole pixel (integer number) amount. So for example, if the x coordinate is currently at 53.3 px, dragging the layer around will preserve the 0.3 px fraction on each drag.


Affinity Photo 1.7.3, Affinity Designer 1.7.3, Affinity Publisher 1.7.3; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.3.155 & Affinity Designer 1.7.3.1 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 13.1.2

Share this post


Link to post
Share on other sites

From what I can tell, exporting a document via the Export dialog with one of the “Selection…” options set doesn’t export the selected layer(s), rather it exports the document cropped to the extents of the boundary of the selected layer(s). This subtle difference, coupled with the partial-pixel positioning gives the extra width/height as found by Gigatronix Pete and explained by Dazzler above.

I would suggest that the two “Selection…” options in the Export dialog are renamed as “Cropped to Selection…” to make the difference a bit clearer.

Note: If you want to export a layer without reference to the document, a Slice can be created in the Export Persona which ‘ignores’ the underlying document and only exports what is in the slice regardless of what else is in the document or where the slice is located in the document.

R-CR: Absolutely. I was just trying to show that these settings don’t always work in the way the user might expect from their names. For example, Force Pixel Alignment doesn’t necessarily force alignment to pixels if Move By Whole Pixels is also on and the layer is not already aligned with the document pixels. There’s a subtlety there that needs to be learned (and I keep forgetting).

Share this post


Link to post
Share on other sites
6 minutes ago, GarryP said:

From what I can tell, exporting a document via the Export dialog with one of the “Selection…” options set doesn’t export the selected layer(s), rather it exports the document cropped to the extents of the boundary of the selected layer(s).

I would expect the ‘Selection without background’ option to yield the selected layer(s) only. If it instead yields a cropped version of the document, the option needs renaming.

9 minutes ago, GarryP said:

Force Pixel Alignment doesn’t necessarily force alignment to pixels if Move By Whole Pixels is also on and the layer is not already aligned with the document pixels

I’ve commented/complained several times about the ‘Move By Whole Pixels’ option being presented as a child of ‘Force Pixel Alignment’. This arrangement means that (a) you have to enable the parent option in order to change the child option, and (b) the child option overrides the parent option instead of refining it.


Alfred online2long.gif
Affinity Designer/Photo/Publisher 1.7.3.481 • Windows 10 Home (4th gen Core i3 CPU)
Affinity Photo for iPad 1.7.3.155 • Designer for iPad 1.7.3.1 • iPadOS 13.2.2 (iPad Air 2)

Share this post


Link to post
Share on other sites
9 minutes ago, Alfred said:

I’ve commented/complained several times about the ‘Move By Whole Pixels’ option being presented as a child of ‘Force Pixel Alignment’. This arrangement means that (a) you have to enable the parent option in order to change the child option, and (b) the child option overrides the parent option instead of refining it.

I think of it neither as a 'child' nor presented as such. It is just an optional additional constraint on how pixel alignment is forced. it can't force anything to happen unless the Force Pixel Alignment option also is enabled, thus it is not overriding that option, just further restricting it.

If you think of it in boolean terms as "Force Pixel Alignment and Move By Whole Pixels" does it make more sense?


Affinity Photo 1.7.3, Affinity Designer 1.7.3, Affinity Publisher 1.7.3; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.3.155 & Affinity Designer 1.7.3.1 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 13.1.2

Share this post


Link to post
Share on other sites

Alfred: I’ve just done a quick check and “Selection Without Background” doesn’t look like it exports the background but it does still add the extra pixel width/height when exporting a layer that isn’t on the pixel boundaries. Either the export function isn’t working how it should or it needs to be renamed, but I’d say that would be for others to decide.

R-CR: I still think it’s confusing. What does “Move by Whole Pixels” give us on top of “Force Pixel Alignment”? If we’re already aligning to the pixels via “Force Pixel Alignment” we are surely moving by whole pixels anyway, so what’s the extra option of “Move by Whole Pixels” for? I just don’t get it.

Share this post


Link to post
Share on other sites

Here’s where I stand on the issue (quickly typed as I have to leave soon):
If the two options “Force Pixel Alignment” (FPA) and “Move By Whole Pixels” (MBWP) were separate options then I could understand what they did.
FPA and MBWP = OFF – No restrictions. That’s fine and dandy.
FPA = ON – Everything is positioned on pixel boundaries. That’s fine and easy to understand.
MBWP = ON – Everything can be positioned without being on a pixel boundary but any movement will be a multiple of whole pixels while keeping any fractional pixel positioning. That’s fine and easy to understand too.
What I don’t understand is what having both FPA and MBWP ON at the same time does.
What we get is: Everything can be positioned without being on a pixel boundary but any movement will be a multiple of whole pixels while keeping any fractional pixel positioning. Which is exactly what we get with MBWP by itself.
For me the only allowable options should be:

  • Neither FPA or MBWP are on, or,
  • FPA can be on by itself, or,
  • MBWP can be on by itself.

But both FPA and MBWP cannot be both on at the same time as they are mutually exclusive (as Alfred said). Allowing sub-pixel positioning, which MBWP does, goes completely against aligning with whole pixels, which is what FPA does. You can’t both align with something and not align with it at the same time.

Share this post


Link to post
Share on other sites
23 minutes ago, GarryP said:

I still think it’s confusing. What does “Move by Whole Pixels” give us on top of “Force Pixel Alignment”? If we’re already aligning to the pixels via “Force Pixel Alignment” we are surely moving by whole pixels anyway, so what’s the extra option of “Move by Whole Pixels” for? I just don’t get it.

From the Help for Force Pixel Alignment (Designer):

Quote

Move By Whole Pixels

In addition to Force Pixel Alignment, the Move By Whole Pixels option allows you to constrain the movement of objects, nodes and handles to whole pixels.

Move By Whole Pixels is particularly useful for repositioning an object by a particular pixel distance while also maintaining the relevant partial pixels an object occupies.

So, basically, if you have intentionally sized or placed an object to occupy partial pixels, then having Move By Whole Pixels active allows you to maintain that object's size/position, while forcing other objects to whole pixel boundaries.

Edit: Note, this may only make sense if you're doing a pixel art design that requires, e.g., lines to be centered on a pixel boundary. That is, the line will start on a .5px and end on the next .5px, with the center of the line at the pixel boundary. But I'm not sure, as I can't claim to really understand the use case.


-- Walt

Windows 10 Home, version 1909 (183623.476), 16GB memory, Intel Core i7-6700K @ 4.00Gz, GeForce GTX 970
Affinity Photo 1.7.3.481 and 1.8.0.486 Beta   / Affinity Designer 1.7.3.481 and 1.8.0.486 Beta  / Affinity Publisher 1.7.3.481 and 1.8.0.502 Beta

Share this post


Link to post
Share on other sites
2 minutes ago, walt.farrell said:

So, basically, if you have intentionally sized or placed an object to occupy partial pixels, then having Move By Whole Pixels active allows you to maintain that object's size/position, while forcing other objects to whole pixel boundaries.

In other words, ‘Move By Whole Pixels’ for existing objects but ‘Force Pixel Alignment’ for new objects. That does make some kind of sense, but it still begs the question of why the MBWP option should be nested under the FPA option.


Alfred online2long.gif
Affinity Designer/Photo/Publisher 1.7.3.481 • Windows 10 Home (4th gen Core i3 CPU)
Affinity Photo for iPad 1.7.3.155 • Designer for iPad 1.7.3.1 • iPadOS 13.2.2 (iPad Air 2)

Share this post


Link to post
Share on other sites
6 minutes ago, Alfred said:

In other words, ‘Move By Whole Pixels’ for existing objects but ‘Force Pixel Alignment’ for new objects. That does make some kind of sense, but it still begs the question of why the MBWP option should be nested under the FPA option.

I think so, yes. And it's nested because without FPA then MBWP doesn't make sense. It's an aspect of forcing pixel alignment at all.


-- Walt

Windows 10 Home, version 1909 (183623.476), 16GB memory, Intel Core i7-6700K @ 4.00Gz, GeForce GTX 970
Affinity Photo 1.7.3.481 and 1.8.0.486 Beta   / Affinity Designer 1.7.3.481 and 1.8.0.486 Beta  / Affinity Publisher 1.7.3.481 and 1.8.0.502 Beta

Share this post


Link to post
Share on other sites
38 minutes ago, R C-R said:

If you think of it in boolean terms as "Force Pixel Alignment and Move By Whole Pixels" does it make more sense?

No it doesn’t, unless we’re talking about new objects versus existing objects as discussed above. When moving an existing object which is not on a pixel boundary you can’t force pixel alignment if ‘Move By Whole Pixels’ takes precedence, and if moving an existing object which is on a pixel boundary the ‘Move By Whole Pixels’ option forces it to end up on another pixel boundary and thereby makes the ‘Force Pixel Alignment’ option redundant.


Alfred online2long.gif
Affinity Designer/Photo/Publisher 1.7.3.481 • Windows 10 Home (4th gen Core i3 CPU)
Affinity Photo for iPad 1.7.3.155 • Designer for iPad 1.7.3.1 • iPadOS 13.2.2 (iPad Air 2)

Share this post


Link to post
Share on other sites
1 minute ago, walt.farrell said:

[MBWP is] an aspect of forcing pixel alignment at all.

The way I see it, MBWP is an aspect of not forcing pixel alignment! ;)


Alfred online2long.gif
Affinity Designer/Photo/Publisher 1.7.3.481 • Windows 10 Home (4th gen Core i3 CPU)
Affinity Photo for iPad 1.7.3.155 • Designer for iPad 1.7.3.1 • iPadOS 13.2.2 (iPad Air 2)

Share this post


Link to post
Share on other sites
40 minutes ago, Alfred said:

When moving an existing object which is not on a pixel boundary you can’t force pixel alignment if ‘Move By Whole Pixels’ takes precedence ...

You can't force pixel alignment at all unless "Force Pixel Alignment" is enabled. So "Move By Whole Pixels" is not 'taking precedence' over "Force Pixel Alignment," just forcing the alignment to change by integer amounts. Either way, it is a force option.

EDIT: So just like what Walt quoted from the help topic it is an addition to the option, not a replacement for it.


Affinity Photo 1.7.3, Affinity Designer 1.7.3, Affinity Publisher 1.7.3; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.3.155 & Affinity Designer 1.7.3.1 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 13.1.2

Share this post


Link to post
Share on other sites
1 hour ago, Alfred said:

In other words, ‘Move By Whole Pixels’ for existing objects but ‘Force Pixel Alignment’ for new objects. That does make some kind of sense, but it still begs the question of why the MBWP option should be nested under the FPA option.

Not to beat a dead horse, but where do you see the MBWP option nested under the FPA option? I don't see that anywhere on my Mac -- the only place those two items appear is side by side on the toolbar in the snapping button set -- so is this some Windows only thing or have I missed some other place where those items appear in the UI?


Affinity Photo 1.7.3, Affinity Designer 1.7.3, Affinity Publisher 1.7.3; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.3.155 & Affinity Designer 1.7.3.1 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 13.1.2

Share this post


Link to post
Share on other sites
3 minutes ago, R C-R said:

MBWP option nested under the FPA option? I don't see that anywhere on my Mac

Not literally 'under'. Try to turn move by... on or off when Force Pixel Alignment is off. Can't be done.


MacBook Pro (13-inch, Mid 2012) Mac OS 10.12.6 || Mac Pro (Late 2013) Mac OS 10.14.5

Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.7.3 | Affinity Designer Beta 1.7.x.x | Affinity Photo Beta 1.7.x.x | Affinity Publisher Beta 1.8.0.502

Share this post


Link to post
Share on other sites
3 minutes ago, Old Bruce said:

Not literally 'under'. Try to turn move by... on or off when Force Pixel Alignment is off. Can't be done.

So doesn't that at least strongly hint that Move By Whole Pixels is an addition to the Force Pixel Alignment option & not an alternative to it?


Affinity Photo 1.7.3, Affinity Designer 1.7.3, Affinity Publisher 1.7.3; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.3.155 & Affinity Designer 1.7.3.1 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 13.1.2

Share this post


Link to post
Share on other sites
1 minute ago, R C-R said:

So doesn't that at least strongly hint that Move By Whole Pixels is an addition to the Force Pixel Alignment option & not an alternative to it?

I've always thought of it as an additional constraint, however the two can't really co-exist, so the MBWP takes precedence. Personally I think if you turn on the MBWP it should turn off the FPA button, as that clearly no longer applies.

Share this post


Link to post
Share on other sites
1 hour ago, R C-R said:

Not to beat a dead horse, but where do you see the MBWP option nested under the FPA option?

Literally "under" (physically and nested), on Windows:

fpa.png.a8a0d7080ebed80ae7902ebd23302561.png

(Compare, for example, with "Snap to spread" and "Include spread mid points", or with "Snap to margin" and "Include margin mid points", etc.


-- Walt

Windows 10 Home, version 1909 (183623.476), 16GB memory, Intel Core i7-6700K @ 4.00Gz, GeForce GTX 970
Affinity Photo 1.7.3.481 and 1.8.0.486 Beta   / Affinity Designer 1.7.3.481 and 1.8.0.486 Beta  / Affinity Publisher 1.7.3.481 and 1.8.0.502 Beta

Share this post


Link to post
Share on other sites
1 hour ago, Dazzler said:

I've always thought of it as an additional constraint, however the two can't really co-exist, so the MBWP takes precedence. Personally I think if you turn on the MBWP it should turn off the FPA button, as that clearly no longer applies.

But it does apply, for new objects that you create. With Force Pixel Alignment (FPA) on (even with Move by Whole Pixels (MBWP) on) a new object you create will have integer x/y pixel values, and integer width/height pixel values.

But you can move that new object ignoring FPA using the Alt key or the Transform panel, and put it on a non-integer x/y value. And then MBWP will keep it on that non-integer value if you move it using the Move Tool without using the Alt key.


-- Walt

Windows 10 Home, version 1909 (183623.476), 16GB memory, Intel Core i7-6700K @ 4.00Gz, GeForce GTX 970
Affinity Photo 1.7.3.481 and 1.8.0.486 Beta   / Affinity Designer 1.7.3.481 and 1.8.0.486 Beta  / Affinity Publisher 1.7.3.481 and 1.8.0.502 Beta

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

These are the Terms of Use you will be asked to agree to if you join the forum. | 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.