Jump to content

Affinity Designer 1 & 2 create a square image border is not the same all around


Recommended Posts

Ok, the title maybe not the best way to explain the situation.

I have tried this in both Designer 1 & 2 and get the same results, and I am sure I have never had this issue before.

If I create a square, with a border of .2 and no fill, it looks fine in Designer. But the moment I export this to a PNG on the HD and try to load it in my game engine or Affinity Photo 1 or 2, it looks wrong to me. What I want is a universal color around the border, and I am not sure if there is a setting for this, or I am just simply exporting it wrong.

This image is inside Affinity Designer 2

image.thumb.png.0923afe5c5cbc274aa7e897c09c53e16.png

 

And this image is inside my Game Engine

image.png.ebcf4fb4452c1bc18e5650781f5a3455.png

 

Link to comment
Share on other sites

It is Pixel perfect? - position and size to whole pixel?

 

22 minutes ago, CyberAngel said:

it looks fine in Designer

Yes, because you use a vector view in it, not a raster one like in APhoto or when exporting to PNG. Try switching ADesigner to Pixel View Mode.

Edited by Pšenda

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.4.0.2301
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130.

Link to comment
Share on other sites

First part of my checklist:

1. Are the X, Y, W and H values of your rectangle integer values in Transform Panel? (Preferences / User Interface / set Decimal Places >=3 )
2. “border of .2” - “.2” what? Pixels, points, inches, etc.?
3. How did you create the “border”?
4. If the border is a Stroke, what is the stroke alignment? Centre, Outside, Inside?

Note: Full-screen screenshots are usually better than cut-down screen-grabs.

Link to comment
Share on other sites

And Line width?
See my previous post edit.

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.4.0.2301
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130.

Link to comment
Share on other sites

6 minutes ago, GarryP said:

First part of my checklist:

1. Are the X, Y, W and H values of your rectangle integer values in Transform Panel? (Preferences / User Interface / set Decimal Places >=3 )
2. “border of .2” - “.2” what? Pixels, points, inches, etc.?
3. How did you create the “border”?
4. If the border is a Stroke, what is the stroke alignment? Centre, Outside, Inside?

Note: Full-screen screenshots are usually better than cut-down screen-grabs.

image.thumb.png.4cb2b53776101749891fd8b9eb84d492.png

Link to comment
Share on other sites

Thanks for the screenshot.

Did you set the Decimal Places in Preferences as suggested?
I’ll assume that you created the border with a Stroke since no FX has been used.
You have a stroke width of 0.2pt – might be better to use an integer pixel value.
I can’t see what the stroke alignment is from your screenshot.

Link to comment
Share on other sites

13 minutes ago, GarryP said:

Thanks for the screenshot.

Did you set the Decimal Places in Preferences as suggested?
I’ll assume that you created the border with a Stroke since no FX has been used.
You have a stroke width of 0.2pt – might be better to use an integer pixel value.
I can’t see what the stroke alignment is from your screenshot.

The solution was to not enter .2 and instead enter 1px

 

Link to comment
Share on other sites

2 hours ago, CyberAngel said:

The solution was to not enter .2 and instead enter 1px

As I wrote above, if you require Pixel perfect output, it is necessary to make a Pixel perfect design as well.

It is therefore advisable to use the settings Force pixel alignment On, and Move by whole pixels Off.

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.4.0.2301
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130.

Link to comment
Share on other sites

  • 2 weeks later...

Folks, let me repeat the Holy Mantra Of Pixel Perfect Design®:

  1. Preferences > User Interface > Decimal Places > Pixel: 6
    You want to see any faint misalignment in your Transform panel, in order to be in full control.
    Keep in mind that this is only a display option. No actual rounding of values takes place when set e.g. to Pixel: 0. You just won't see the decimal places, they will be hidden.
  2. Snapping > Force Pixel Alignment: ON
    > Move By Whole Pixels: OFF 
    > optional but also useful with pixel layers: Snap to pixel selection bounds
    As already explained above.
  3. View > View Mode > Pixels 
    You want to preview your pixels all the time!
  4. Stroke width must always match your pixel grid, otherwise it will be always antialiased, no matter how you attempt to align it.
    I.e. an open vector stroke can be only 1, 2, 4, 6, 8, 10, 12 pt/px etc. wide to always align because the stroke always aligns to center, unlike closed curves.
  5. Make use of the document grid.
    My favorite setting: Spacing 8 px, Divisions 8. Always visible pixel grid at my disposition.
    And optionally you can then also enable Snapping > Snap To Grid.

Is it complex?
Yes.

Why?
Because sometimes you may want to override some of these settings. That's why we have these options.

The main flaw?
That would be item #1. Who ever thought that this preference setting is a good idea? It only confuses users!

MacBookAir 15": MacOS Ventura > Affinity v1, v2, v2 beta // MacBookPro 15" mid-2012: MacOS El Capitan > Affinity v1 / MacOS Catalina > Affinity v1, v2, v2 beta // iPad 8th: iPadOS 16 > Affinity v2

Link to comment
Share on other sites

26 minutes ago, loukash said:

Folks, let me repeat the Holy Mantra Of Pixel Perfect Design®:

  1. Preferences > User Interface > Decimal Places > Pixel: 6
    You want to see any faint misalignment in your Transform panel, in order to be in full control.
    Keep in mind that this is only a display option. No actual rounding of values takes place when set e.g. to Pixel: 0. You just won't see the decimal places, they will be hidden.
  2. Snapping > Force Pixel Alignment: ON
    > Move By Whole Pixels: OFF 
    > optional but also useful with pixel layers: Snap to pixel selection bounds
    As already explained above.
  3. View > View Mode > Pixels 
    You want to preview your pixels all the time!
  4. Stroke width must always match your pixel grid, otherwise it will be always antialiased, no matter how you attempt to align it.
    I.e. an open vector stroke can be only 1, 2, 4, 6, 8, 10, 12 pt/px etc. wide to always align because the stroke always aligns to center, unlike closed curves.
  5. Make use of the document grid.
    My favorite setting: Spacing 8 px, Divisions 8. Always visible pixel grid at my disposition.
    And optionally you can then also enable Snapping > Snap To Grid.

Is it complex?
Yes.

Why?
Because sometimes you may want to override some of these settings. That's why we have these options.

The main flaw?
That would be item #1. Who ever thought that this preference setting is a good idea? It only confuses users!

Then maybe there should be an option to select the Unit of measure rather than having to remember it each time.

For example, allow the input to happen, and right next to it have the option to select PT/PX or whatever other unit could be used here!

Link to comment
Share on other sites

Just now, CyberAngel said:

allow the input to happen, and right next to it have the option to select PT/PX or whatever other unit could be used here

You can override units in the Transform panel input fields and (almost) elsewhere at any time. The fields can do math and many other nifty tricks.
(The issue is just this weird "Decimal Places" display preference.)

https://affinity.help/designer2/en-US.lproj/pages/Workspace/expressions.html

MacBookAir 15": MacOS Ventura > Affinity v1, v2, v2 beta // MacBookPro 15" mid-2012: MacOS El Capitan > Affinity v1 / MacOS Catalina > Affinity v1, v2, v2 beta // iPad 8th: iPadOS 16 > Affinity v2

Link to comment
Share on other sites

7 minutes ago, loukash said:

You can override units in the Transform panel input fields and (almost) elsewhere at any time. The fields can do math and many other nifty tricks.
(The issue is just this weird "Decimal Places" display preference.)

https://affinity.help/designer2/en-US.lproj/pages/Workspace/expressions.html

I am talking about the ability to select the Unit of measure, simply overriding it like this is not enough!

In other words, I am not going to override it for every time I need to use pixels over PT!

Link to comment
Share on other sites

Just now, CyberAngel said:

select the Unit of measure

That can be done via page ruler > right-click the unit in the corner, or Document > Document Setup > Document Units
Stroke width units can be adjusted separately in Preferences > User Interface > Show Lines In Points

MacBookAir 15": MacOS Ventura > Affinity v1, v2, v2 beta // MacBookPro 15" mid-2012: MacOS El Capitan > Affinity v1 / MacOS Catalina > Affinity v1, v2, v2 beta // iPad 8th: iPadOS 16 > Affinity v2

Link to comment
Share on other sites

Just now, loukash said:

That can be done via page ruler > right-click the unit in the corner, or Document > Document Setup > Document Units
Stroke width units can be adjusted separately in Preferences > User Interface > Show Lines In Points

Again it is not a solution as I have documents that are using PT, but every now and then I need to create a PX version of it, so I will be advocating for a drop-down next to the stroke thickness, I am not going to go all over the place to make a simple one item selection to please you!

Link to comment
Share on other sites

4 minutes ago, CyberAngel said:

every time I need to use pixels over PT

As long as your document is Document Settings > Dimensions > DPI = 72:
1pt = 1px

MacBookAir 15": MacOS Ventura > Affinity v1, v2, v2 beta // MacBookPro 15" mid-2012: MacOS El Capitan > Affinity v1 / MacOS Catalina > Affinity v1, v2, v2 beta // iPad 8th: iPadOS 16 > Affinity v2

Link to comment
Share on other sites

1 minute ago, CyberAngel said:

I am not going to go all over the place to make a simple one item selection to please you!

My sincere apologize for trying to be helpful. Rest assured that it won't happen ever again.

MacBookAir 15": MacOS Ventura > Affinity v1, v2, v2 beta // MacBookPro 15" mid-2012: MacOS El Capitan > Affinity v1 / MacOS Catalina > Affinity v1, v2, v2 beta // iPad 8th: iPadOS 16 > Affinity v2

Link to comment
Share on other sites

2 minutes ago, loukash said:

My sincere apologize for trying to be helpful. Rest assured that it won't happen ever again.

Good.... As much as I appreciate it, there have been many times, where I have my print work converted to Pixel, and other formats and I am getting sick of having no option to just select the Unit of Measure right there.

And while I appreciate the help, in my case it is not often enough that I do this, but often enough that I keep forgetting to type px in that box, where as a drop down for the Unit of Measure would be highly beneficial for some other stuff that I do!

Link to comment
Share on other sites

15 hours ago, km.au said:

I think this is a bug, even exporting an image that is several times larger there is always a transparent pixel layer surrounding the artboard

Any example?
Is the position and size of the image, and the artboard on which it is located, in whole pixels? Isn't some fx applied, for example a shadow/glow, which enlarges the exported image? etc...

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.4.0.2301
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130.

Link to comment
Share on other sites

21 minutes ago, Pšenda said:

Any example?
Is the position and size of the image, and the artboard on which it is located, in whole pixels? Isn't some fx applied, for example, a shadow/glow, which enlarges the exported image? etc...

The image or rectangle is at the beginning of this thread as an example, the problem was that in my case I was entering .4 for pixels, which is wrong. And the moment I entered 2px for the stroke, all was good.

Now my point of contention is that, rather than type a value and the Unit you want, the Unit is available via a drop down. It is not rocket science to know that you can enter any unit in here and it is auto converted to point. I am suggesting it doesn't and remember that it was pixel and not point. The solution to go and change the document to pixel and then do what I require and then convert it back to point is a long winded way of a workflow.

you guys might be used to that, I am used to UI that is intuitive, and for the most part, Affinity is intuitive. But, it needs some improvements.

Link to comment
Share on other sites

4 minutes ago, CyberAngel said:

The image or rectangle is at the beginning of this thread as an example, the problem was that in my case I was entering .4 for pixels, which is wrong. And the moment I entered 2px for the stroke, all was good.

Now my point of contention is that, rather than type a value and the Unit you want, the Unit is available via a drop down. It is not rocket science to know that you can enter any unit in here and it is auto converted to point. I am suggesting it doesn't and remember that it was pixel and not point. The solution to go and change the document to pixel and then do what I require and then convert it back to point is a long winded way of a workflow.

you guys might be used to that, I am used to UI that is intuitive, and for the most part, Affinity is intuitive. But, it needs some improvements.

??? Did you notice whose post I'm responding to?

P.S. If I enter "+=(13mm/(72/300)+2.5")" to the existing value of "10px", then which of the units would you like to display, rather than the base unit of the document?

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.4.0.2301
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130.

Link to comment
Share on other sites

2 minutes ago, Pšenda said:

??? Did you notice whose post I'm responding to?

P.S. If I enter "+=(13mm/(72/300)+2.5")" to the existing value of "10px", then which of the units would you like to display, rather than the base unit of the document?

In my example, it should be based on the Unit selected in the drop down.

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.