fredrikonline Posted August 17, 2023 Share Posted August 17, 2023 Hi! I am trying to draw a straight black line in Affinity Photo 2 using the pen tool. However, no matter what I do and what settings I try, the software insists on adding a gray border to the sides of the line, so that it looks blurry (see attached image). Can someone please explain how to fix this, so that the line looks normal? Quote Link to comment Share on other sites More sharing options...
v_kyr Posted August 17, 2023 Share Posted August 17, 2023 You can use the blend options for the drawn Pen line and adjust it via the "Coverage map" accordingly for the selected line curve layer ... Shows how to access the blend options for the line Shows the default behavior (what you actually see there in your tryouts for the line) Shows how to adjust the Coverage map accordingly (by dragging the left side of the diagonal line also to top, so it get's a straight line on top) 1) 2) 3) OR maybe even easier use and try the Antialising: "Force Off" setting ... Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2 Link to comment Share on other sites More sharing options...
GarryP Posted August 17, 2023 Share Posted August 17, 2023 Welcome to the forums @fredrikonline In addition to the advice above, it looks to me like you have used a stroke width of 4 pixels and the X coordinate is mid-pixel (not an integer) so the software is trying to draw two pixels – each side of the line – over three pixels, which is why you get the grey ‘border’ (because of antialiasing). Photo always shows you the document at ‘document pixel resolution’ so, in this case, try moving the line so its centre is aligned to the grid to get two pixels either side of the line and therefore no ‘border’. See attached image where the left-hand line is aligned to the grid but the right-hand line is not. Quote Link to comment Share on other sites More sharing options...
fredrikonline Posted August 17, 2023 Author Share Posted August 17, 2023 Thank you for your input @v_kyr. Unfortunately, dragging the left part of the diagonal line in “The coverage map” to the top does not seem to have any effect on the line and the unwanted edges (please see attached image). I appreciate your input @GarryP. However, centering the image does not seem to solve the situation either, except that the software adds additional edges to the sides of the line in certain positions. Quote Link to comment Share on other sites More sharing options...
GarryP Posted August 17, 2023 Share Posted August 17, 2023 2 hours ago, fredrikonline said: I am trying to draw a straight black line in Affinity Photo 2 using the pen tool. 14 minutes ago, fredrikonline said: However, centering the image does not seem to solve the situation either You said you were trying to draw a straight black line, but you now mention centring the image. Is that just a language translation issue or do you have an image of a line? If you have an image of a line, how did you get that? (I have a feeling that you might have rasterised something when you didn’t need to rasterise it.) Can you show us a full-screen screen shot where we can see the ‘problem layer’ selected in the Layers Panel ? Quote Link to comment Share on other sites More sharing options...
v_kyr Posted August 17, 2023 Share Posted August 17, 2023 32 minutes ago, fredrikonline said: Thank you for your input @v_kyr. Unfortunately, dragging the left part of the diagonal line in “The coverage map” to the top does not seem to have any effect on the line and the unwanted edges (please see attached image). Strange, here's the common behavior I can deal with that and overcome with it under APh v1 ... screencast_antialising_aph1.mp4 Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2 Link to comment Share on other sites More sharing options...
fredrikonline Posted August 17, 2023 Author Share Posted August 17, 2023 @GarryP Sorry, that was a mistake. I meant line, not image. Anyway, it seems that the unwanted gray sides of the line disappear at certain thicknesses of the line (when they end up on top of the line instead), so I guess I'll just have to choose a size where the side lines are not visible. I suppose this has to do with what you wrote earlier, although moving the line did not seem to have any effect. @v_kyr Yes, that is strange. I don't get the same effect as you do in the video. Dragging the diagonal line in the Coverage Map does not affect the black line for me. Quote Link to comment Share on other sites More sharing options...
markw Posted August 17, 2023 Share Posted August 17, 2023 I wonder what is the final intent of the document in question? It’s just that I note you are zoomed in to 900% to see this "problem", which looks like an antialiasing issue. What dose the line actually look like at it’s, for want of a better term, final intended use size? Quote macOS 12.7.6 | 15" Macbook Pro, 2017 | 4 Core i7 3.1GHz CPU | Radeon Pro 555 2GB GPU + Integrated Intel HD Graphics 630 1.536GB | 16GB RAM | Wacom Intuos4 M Link to comment Share on other sites More sharing options...
Oufti Posted August 17, 2023 Share Posted August 17, 2023 If this is intended to be used on screen (web publishing for instance), you would be better to use pixels as unit for your stroke. Using points can result in partial pixels values, that Photos will render with antialiasing (unless it is set to off, as shown by @v_kyr). If it is to be printed, don't mind about that. It just appears on screen with APhoto. ++++++++++ 1 hour ago, fredrikonline said: it seems that the unwanted gray sides of the line disappear at certain thicknesses of the line (when they end up on top of the line instead), so I guess I'll just have to choose a size where the side lines are not visible. I suppose this has to do with what you wrote earlier, although moving the line did not seem to have any effect. If you use integer pixel values for the stroke and you place your line aligned on the pixel grid (i.e. position must be integer pixel value, not fractional), there will also be no antialiasing. — You can do this manually or set it in the Magnetism settings: https://affinity.help/photo2/fr.lproj/pages/DesignAids/snapping.html https://affinity.help/photo2/fr.lproj/pages/DesignAids/pixelAlign.html 5 hours ago, fredrikonline said: it looks blurry = 4 hours ago, GarryP said: […] the software is trying to draw two pixels – each side of the line – over three pixels, which is why you get the grey ‘border’ (because of antialiasing). Photo always shows you the document at ‘document pixel resolution’ so, in this case, try moving the line so its centre is aligned to the [pixel] grid to get two pixels either side of the line and therefore no ‘border’. Quote Affinity Suite 2.5 – Monterey 12.7.5 – MacBookPro 14" 2021 M1 Pro 16Go/1To I apologise for any approximations in my English. It is not my mother tongue. Link to comment Share on other sites More sharing options...
GarryP Posted August 18, 2023 Share Posted August 18, 2023 @fredrikonline I see that your document unit of measure (UOM) is centimetres (see top-left corner of the rulers). I can’t see the position of the line which is selected because you have the Node Tool selected but, if the X position of the line or the Stroke width is also specified in centimetres, then that could be a cause of the problem. Your document will have a dots per inch (DPI) setting which is measured in inches, which tell the software how many pixels there are in each inch. If you are measuring things in centimetres then it’s unlikely that you will have chosen a centimetre size which translates to an integer pixel size – inches and centimetres have very few ‘common factors’. Try changing the document UOM to pixels (right-click the UOM on the ruler corner – where it currently says “cm” – and choose “Pixels”), then check the X value of the line in the Transform Panel, when you have the line selected, to make sure that it is an integer number of pixels and also check to see if the Stroke width is an integer number of pixels. The bottom line here is that, if you want to be ‘pixel-perfect’ then you need to use a document UOM of pixels and make sure that, for lines at least, you are specifying X/Y positions by integer pixel values and have a stroke width of an integer pixel value, otherwise antialiasing will probably occur (unless you have done some other things, some of which have already been mentioned). To sum-up: Change the UOM to pixels; Select the layer with the Move Tool; Check the X/Y positions of the line are integer pixel values; Check the Stroke width is an integer pixel value. Quote Link to comment Share on other sites More sharing options...
fredrikonline Posted August 19, 2023 Author Share Posted August 19, 2023 @GarryP@Oufti Thank you for your input and detailed instructions. Changing the settings to pixels did not seem to have any effect on the unwanted gray borders. However, when I move the line slightly sideways, to an X position that is not an integer, the line looks solid, so this is obviously a matter of pixels just as you assumed. Please see the attached images. Quote Link to comment Share on other sites More sharing options...
GarryP Posted August 19, 2023 Share Posted August 19, 2023 (edited) Thanks for the screenshots. Note: When giving us a screenshot, please show us the whole of the application window, including the main Toolbar; we have more information that way. When your line has an odd number of pixels, and the line is pixel-aligned (its centre is at a pixel boundary), the software is trying to draw a half-pixel on each side of the line (e.g. width of 5 pixels divided by 2 = 2.5 pixels each side). This is where the grey comes from as the software tries to draw something that only half-exists. The same thing happens when you have an even number of pixels and the line is aligned to the centre of a pixel. What you are seeing is normal for Photo, and you can see the same thing in Designer’s Pixel Mode. Edited August 19, 2023 by GarryP Added note. Oufti 1 Quote Link to comment Share on other sites More sharing options...
R C-R Posted August 19, 2023 Share Posted August 19, 2023 6 hours ago, fredrikonline said: However, when I move the line slightly sideways, to an X position that is not an integer... That works because you are moving it exactly by one half (0.5) of a pixel. If you moved it by say 0.4 px you would get the antialiasing effect. Quote All 3 1.10.8, & all 3 V2.5.5 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7 All 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7 Link to comment Share on other sites More sharing options...
fredrikonline Posted August 20, 2023 Author Share Posted August 20, 2023 @GarryP That makes sense. Thank you for your help. I will keep your advice on screenshots in mind. Quote Link to comment Share on other sites More sharing options...
fredrikonline Posted August 20, 2023 Author Share Posted August 20, 2023 @R C-R That makes sense. Thank you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.