Jump to content

Recommended Posts

Posted

I hope I can describe this well enough.

I'm making a composite of what will probably end up being 150 little images. I'm taking each of their pictures on a light table that has a very flat white light PLUS an overhead lamp. As these are three dimensional objects, I'm taking a batch of fifty pictures using a focus bracketing. I then do a focus merge in Affinity. That leaves me with an image of the three dimensional object completely in focus front to back. It works very well.

I then get rid of the flat white background by using the Wand set with a tolerance of 10% (any greater and it starts grabbing the image itself). There being some little specks that tend to fall off each object, I have to also select them out. The end result is the image of the object against a transparent background which I save as a TIFF file.

So far so good.

After I did around 85 of them I started placing them in a larger "canvas" (with a transparent background) with each picture having its own layer until the whole canvas is completely full and you can't see the background. That was when I started noticing very thin faint white lines around the edge of the frame of each image. Some are so faint I was fooled at first that they didnt have any until I zoomed much further in.

I'm now having to spend well over an hour hunting these out and erasing them. (I created a layer filled with black that I'm placing next to each of the 85 layers.)

So the question is why. This happened to me before with a completely different set of images that I had thought I had successfully selected out the background (to put it against a transparent background) only to later find it had white lines around the edges.

I've never had this happen before in Photoshop.

edge outline.jpg

Posted

Are the images Pixel perfect? - i.e. position and size to whole pixels?

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.5.7.2948 (Retail)
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
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.

Posted

This might explain the issue 

 

Mac mini M1 A2348 | MBP M3 

Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.

 

Posted

Pšenda:  i've worked  in  Photoshop for  thirty years and I don't know what you mean.   But see below, maybe my new attempt will answer your question.

Psenda: I've worked in Photoshop for thirty years, and I have no idea what you mean. But see below, maybe my new attempt will answer your question.

Notmyfault: no that doesn't explain it. I think maybe I didn't describe this well enough.

 

This is not about a relationship of one edge of pixels to another edge of pixels. This is about lines that are not selected out (along the far edge of each rectangular canvas) when I do a selection of the background to remove it.

this is one of the many final edited images that I will place in the larger canvas. it has been selected as a whole to be copied and pasted into the larger canvas. It originally had a white background.

Here is an image with the white background. I can't find the same one as the other example images, but it doesn't matter:

originalimage.thumb.jpg.e7dd9f71398d8d1bd91a9f27e10deb73.jpg

i have to select that white background with the wand and delete it in order to have a transparent background:

selectedimage.thumb.jpg.483ee383bb5a39bd13d1cad3d059c682.jpg

this is now right after it has been placed into the larger canvas. I made a black background only for purposes of being able to make the white line visible for you. that white line is the edge of the frame of the original image.

againstbackground.thumb.jpg.1e9d31fc17b55ec30c49f8828fb34cc2.jpg

 

Whether or not i understand psenda, I decided to try rasterizing the image BEFORE I copy and paste it into the larger canvas. But that resulted, again, with a white line along what was the original edge of that smaller picture.

firstrasterizedthenplaced.jpg.a52d84798e5ad5252fc7de2266882ce2.jpg

Posted
15 minutes ago, AndyV said:

Psenda: I've worked in Photoshop for thirty years, and I have no idea what you mean. But see below, maybe my new attempt will answer your question.

Notmyfault: no that doesn't explain it. I think maybe I didn't describe this well enough.

 

Sounds a bit reluctant / not willing to accept advice. Your long experience with PS maybe in the way. Affinity differs, and you may need to unlearn PS and learn the Affinity style. In contrast to PS and what former PS users expect, affinity allows fractional positions and does not automatically round up or down. This caused a lot of confusion and frustration. We try to help you through the process. 

please activate pixel grid, and use transform panel to inspect size and position of all layers. In addition the channels panel is your friend, activate the alpha channel and inspect the area with thin lines for partial alpha.

it would  really help if you can upload one example file (afphoto format) showing the issue, we can then show exactly what is causing the unwanted lines in a way you might be willing to accept.

Mac mini M1 A2348 | MBP M3 

Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.

 

Posted

Could you please not make this personal. My response to you  has absolutely nothing whatsoever to do with my not willing to accept advice. I wouldn't be posting this question here in the first place if I was.

I have already assumed that Affinity does work differently than Photoshop. My question is basically that: what is going on. But to suggest that I have to bother with channels and inspect the alpha channel EACH AND EVERY TIME I do something like this sounds more like a fault of Affinity. The only reason I say something like "this doesn't happen in Photoshop" is that I'm not doing anything really extraordinary here. I'm just using the wand to select out a background, and for some reason, Affinity isn't doing a complete selection. THAT is the problem and the question. Not whether I am being an arrogant former Photoshop user.

The background I am selecting out is from a light table I'm placing these leaves on. It is very flat throughout. Any other "glitches" that I have to pick out are only from bits of the leaves that crumble onto the light table as I handle the leaves. The leaves are placed in a rather random position on the light table, meaning that their "edge" is different from picture to picture. But even more importantly, I'm cropping each picture before selecting out the background, so that cropped edge is dependent on the size of the leaf.

Therefore, each image has a completely different part of the light table as the white background. But each and every image has this white line (presumably one pixel in width but I haven't measured each one) around the edge. That suggests to me a fault in how the wand works.

I suppose one thing I can try is to raise the tolerance level of the wand drastically higher and see what happens. But even if that fixes the white line, that will make the wand useless for this work.

I'll work up an afphoto for you soon.  

Posted

Circulus: yes of course. But I am only "guilty" of doing a step that has never caused this sort of problem before. I don't think it's too much to expect the wand to pick up all the way to the edge of a very flat field of white. And the fact that it IS selecting most everything quite well but NOT going all the way to the edge, suggests that the ability of the Wand to select is working just fine. The ability of the wand to go all the way to the edge isn't.

Yes of course  now that I know that the wand has a problem to it, I can now take the extra steps to erase around the edge. That's what I just spent nearly two hours in doing. I hope you can understand that when you have hundreds of files to work on, with a repetitive task, the least amount of steps you have to take the better. And unfortunately these steps can't be automated very well, if at all.

I just posted the problem here because my immediate reaction is that there is a glitch in the tool. I am still hoping that there is something I'm missing in my use of it, but I sure can't see what it might be.

Posted

Okay here are two afphoto files.

The first "original image.afphoto" is what would be straight out of the camera BUT focus merging about 25 images (it varies: sometimes 20 to as much as all 50 that were shot) It's 85mb.

original image.afphoto

The second "edited image.afphoto" is after my editing steps:

1 crop it to just around the leaf;

2 select the background using the wand at 10% tolerance;

3 use the Marque/add to select out any little bits of leaf around the background;

4 cmd-x to cut out the selection

5 reduce the size: first without resampling i change the dpi to 300; then i click on resample; then i change the units to inches and reduce that. again that varies from leaf to leaf but ranges from 6 inches in length to 10 inches in length. This one I reduced to 6 inches in length. Around 24mb.

edited image.afphoto

I then export that into a TIFF file. Here is that file but I don't think that's important for this purpose.

edited image.tiff

And then I placed it into the larger canvas (what I am calling composite leaves) and for these purposes, I place it against a flat black background. And voila. See the white edge in this screenshot:

editedimage.jpg.d7ce5fadf78c6acc9e7327e300a3c237.jpg

 

EDIT: I just tried the steps again but with boosting the tolerance of the wand up to 20% (even at 20 it starts to select the leaf, so that is really the most I would want to go). It left a white edge around it, just like all the rest.

 

Posted

The issue is caused by using inches as document units.

This leads to fractional pixels at the right and lower edge, causing partial alpha.

this is visible by using pixel grid and rulers. 

to avoid, use pixel as document units, and check that no fractional digits are used.

Again, I’m only explaining how Affinity works currently. I don’t like how it is. You and others may call it a bug. Affinity knows the issue since years and never fixed it. So we as users provide information about possible workarounds.

 

IMG_2126.png

Mac mini M1 A2348 | MBP M3 

Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.

 

Posted

Notmyfault: I'm afraid that isn't the solution. I tried the whole process again leaving the units in pixels but that still created a white line around the edge

I also tried a new step. Once with the background all selected, I went around the edge with the Marquee on Add, spreading the marquee selection as far up into each edge as I could, and then cut that additional selection. I placed that onto a black background and the white edge was still there.

I then tried AGAIN but going around the edge with the Eraser and that did (of course) get rid of the white line. I could also just crop it down a bit on all four edges.

 

Circulus: I pretty much follow what you're doing but that is a lot of extra steps to avoid what would be a much simpler step IF the wand worked as i think it should. If this were only one image I'm working on, that would be a viable solution. But I'm up to file 84 and counting. Given my choices and given the limited chance I'm going to get the Affinity people to admit there is something wrong with the Wand, I'm just going to do the extra erase step as that is the quickest workaround.

 

Posted

I've had this issue a while ago. The only thing to avoid this is to crop after selecting and masking.

In my experience, no matter what you do, the edge pixels will never get fully transperent. Cropping or erasing them away is the only thing I found as a solution. Masking won't work.

I have adjusted my workflow so I haven't had this since then. But from a usability standpoint these edge lines shouldn't be there in the first place, imho. 

1. Select and erase or Mask

2. Crop

 

Edit: It's unfortunate that you are already at 84 files. If you are erasing the edges in all these layers, you can speed it up by clicking on the first corner and then hold the shift key while clicking on the other three corners. That's faster than trying to drag the eraser on the edges.

Posted
1 hour ago, AndyV said:

Around 24mb.

Just out of curiosity - why are you working with an image that is outside the document boundaries?
image.thumb.png.c2ec32df07b1d1cd2a458f6872ffac73.png

If I did Rasterize and Trim, your document shrunk to 3MB.

The image is opaque beyond the canvas.
image.png.380f7d30ac34dcca3e79833c3b124264.png

So does this mean that you select and erase the background only in the canvas area, not in the entire image? Why don't you crop the image to the canvas size and then select and erase its background?

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.5.7.2948 (Retail)
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
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.

Posted

Psenda: Sorry I don't understand your question. 

But each of these single images are placed into a much larger image.

Posted
23 minutes ago, user_0815 said:

I've had this issue a while ago. The only thing to avoid this is to crop after selecting and masking.

In my experience, no matter what you do, the edge pixels will never get fully transperent. Cropping or erasing them away is the only thing I found as a solution. Masking won't work.

I have adjusted my workflow so I haven't had this since then. But from a usability standpoint these edge lines shouldn't be there in the first place, imho. 

1. Select and erase or Mask

2. Crop

 

Edit: It's unfortunate that you are already at 84 files. If you are erasing the edges in all these layers, you can speed it up by clicking on the first corner and then hold the shift key while clicking on the other three corners. That's faster than trying to drag the eraser on the edges.

Finally someone who has the same problem. It still begs the question of why you can't select everything. I  hate to keep comparing to Photoshop, but that is what I'm used to, but even with that aside, it makes no sense that a selection to an edge isn't really to an edge. And if this is by design, I sure don't understand what the thinking is.

Yes I use the shift key to erase a full line.

Posted

I have no problem with white lines on the edges of the image:

 

 

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.5.7.2948 (Retail)
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
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.

Posted

Psenda: If you want to tell me what you're doing differently than I am, I'm all ears. If you don't, then thank for what responses you've given. And I'll do the workarounds. After this happening 84 consecutive times, along with the new post by user0815, I think it's clear that Affinity just does this.

Posted
2 hours ago, AndyV said:

Psenda: Sorry I don't understand your question. 

But each of these single images are placed into a much larger image.

@Pšenda hit the nail.

you just need to rasterize and trim the layer in the file before starting to erase or selecting, copying etc. 

this will

  • remove all areas outside the visible Canvas 
  • correct fractional size / position
  • use pixel as document units

Because you start with a cropped canvas, the layer has many excess pixels outside the visible region, and the layer is not pixel aligned.

This causes the semitransparent edge pixels.

The cause of edge lines is the result of your workflow (and design issues of Affinity apps).

if you follow the advice given earlier, the issue can be avoided.

  • check always for pixel alignment
  • use rasterize and trim 

IMG_2131.png

IMG_2130.png

IMG_2129.png

IMG_2128.png

Mac mini M1 A2348 | MBP M3 

Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.

 

Posted

I admit I haven't completely understood how Affinity works with layers. Maybe it's similar to Photoshop, but I've never had to rasterize anything before. It has never been part of my workflow. When I came across that operation (when I right click on a layer and see "Rasterize") I basically ignored it. But then again, as I say in one of my posts above, I tried the whole operation with a rasterized layer and it still left a white edge.

I also don't understand "pixel alignment". Obviously I need to read up more on all that.

So right now, this is the part of your explanation I"m stuck at:

"Because you start with a cropped canvas, the layer has many excess pixels outside the visible region, and the layer is not pixel aligned."

Are you saying that even if I crop, it is leaving a pixel width of "blankness"? If that is the case, I'm even more befuddled as to why it is designed to do that. It sounds as if Affinity is actually adding something all around the edge. 

Posted
18 minutes ago, AndyV said:

Because you start with a cropped canvas, the layer has many excess pixels outside the visible region, and the layer is not pixel aligned."

Are you saying that even if I crop, it is leaving a pixel width of "blankness"? If that is the case, I'm even more befuddled as to why it is designed to do that. It sounds as if Affinity is actually adding something all around the edge. 

If you crop the canvas, it only defines the visible area, but does not trim (cut off) off anything from the layers. You can always unclip canvas to see any areas formerly outside.

only if you rasterize and trim, areas outside the visible canvas will be eventually trimmed.

This is a major difference to PS.

Using the move tool, it will display the bounding boxing blue, and the actual position and size etc  in the transform panel. You must utilize these tools, otherwise fractional pixels will bite you. It is a mayor annoyance of Affinity.

Mac mini M1 A2348 | MBP M3 

Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.

 

Posted

 

just the consequences of illogical handling of fractional pixels.

Mac mini M1 A2348 | MBP M3 

Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.

 

Posted

Thank you for all this, even though it is all more than I bargained for. I can't say I completely understand it and it boggles my mind that this relates to what has been going on. I'll try adjusting the preferences as your other post suggests and see what happens. 

But, with all due respect, I'll remain prepared to just erase around the edges and be done with it. 😁 

I have work to do!

I know I'm being simplistic, but all this suggests to me that Affinity was designed by scientists and Photoshop was designed by artists.

Posted
1 hour ago, AndyV said:

all this suggests to me that Affinity was designed by scientists and Photoshop was designed by artists.

BTW, it affects mainly APhoto, whereas this 'scientific' effect might not occur/disturb in a 'vector surrounding' like APub or AD, which means the Affinity developers were aware of the difference.

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

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.