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

Affinity Photo 2.1 (not sure if it is only related to this) copy and paste and export is not consistent


Recommended Posts

2 minutes ago, R C-R said:

Thanks, but not really an answer for what I was asking, which is do you always (or never?) get partial transparency even if nothing copied has any partial transparency & everything is pixel aligned?

The answer to your question was "Yes."

Link to comment
Share on other sites

6 minutes ago, Brian_J said:

The results you get in the test 4 file is exactly what I would expect. That's the issue with copying using a selection that has been transformed.

Why should there be any partial transparency, & in particular why is it different at the corners vs. the edges? To repeat, even after the marching ants selection was transformed, there were no partially transparent pixels in the layer I was copying from.

EDIT: please note that in step 3 of the history the marching ants enclose exactly 224 X 248 pixels & are exactly aligned to the top left edge of the layer that I later copy from (at 0,0). There is no partial transparency in what the marching ants enclose in the pixel layer, which you can confirm with the Info panel -- the alpha is 255 for every single one of them.

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

Just now, R C-R said:

Why should there be any partial transparency, & in particular why is it different at the corners vs. the edges? To repeat, even after the marching ants selection was transformed, there were no partially transparent pixels in the layer I was copying from.

I don't think I can add any insight beyond what's already been provided. @lepr has provided a number of explanations that seem reasonable to me and appear to explain what I'm experiencing. But ultimately, I only know what happens, predictably for me; not sure of the "why."

From my nontechnical, layperson perspective: a marquee selection is raster; when a raster object (a selection, in this case) is transformed, it gets distorted; the distortion only applies to the edges of the selection for whatever reason... like feathering; when a "distorted" (i.e., transformed) selection is used to copy an object, the attributes of all the pixels in the selection are applied to what's being copied, which results in the pasted object being feathered. The pixel attributes in the selection that are applied to the 'copy' command are only transparency, because that's all the information that's in the selection... there is no color.

The corners look like what I'd expect when blurring or feathering a rectangle.

Link to comment
Share on other sites

14 minutes ago, R C-R said:

test 4.afphoto shows partial transparency in the pasted layer but I believe I was careful to keep everything pixel aligned, so I do not understand where the partial transparency is coming from or needed.

Thanks for the file. Yesterday, I gave you the explanation for a copy being feathered when a transformed Pixel Selection is active at the moment the copy is created and placed on the on the clipboard.

Your document shows the expected result for your process, when you understand how the software operates.

Here again are things for you to accept or reject:

  • a Pixel Selection is a raster object (like a mask) whose pixel values will be used to modify the opacity of some other object's pixels
  • a Pixel Selection has a transformation matrix in addition to its raster grid to enable non-destructive transformations
  • to apply the Pixel Selection to the opacity of a target object's pixels, its raster grid needs to be resampled to the target's raster space
  • the app uses bilinear resampling for that resampling 

 

Link to comment
Share on other sites

2 minutes ago, lepr said:

Yesterday, I gave you the explanation for a copy being feathered when a transformed Pixel Selection is active at the moment the copy is created and placed on the on the clipboard.

Why should the transformed selection feather anything if nothing in the copy created from the layer is feathered?

IOW, in terms of this transformation matrix, in this case everything should map 1 to 1 between the selection & the layer to exact whole pixel values. Otherwise, there is no way to use a pixel selection to copy anything exactly from one pixel layer to a new one, or avoid resampling even when there is no need to do so.

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

10 minutes ago, Brian_J said:

a marquee selection is raster; when a raster object (a selection, in this case) is transformed, it gets distorted; the distortion only applies to the edges of the selection for whatever reason...

What exactly is being distorted if no pixel layer is currently selected? For that matter, what is being distorted if there are as yet no layers at all in the document?

Besides, why does this supposed distortion apply only to the edges when later a layer is selected to copy (actual raster) pixels from when everything selected in the layer is whole, fully opaque pixels?

It makes no sense.

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

39 minutes ago, R C-R said:

What exactly is being distorted if no pixel layer is currently selected? For that matter, what is being distorted if there are as yet no layers at all in the document?

At the risk of misrepresenting something, this is my understanding...

Think of a selection like a mask — it has transparency data in it, but it's invisible until it's applied to an object.

The pixel data in a selection is in the selection itself; unrelated to layers — for example, feathering a Marquee selection has no effect on layers. Transforming a Marquee selection (a raster element) changes the pixel data, which has the effect of "feathering" the edges. When the selection is used to copy something, the data for each pixel in the selection is applied to the corresponding pixel in the object being copied.

As far as why only edge pixels are effected, I don't know. Selections seem to be a lot like masks... when a mask is blurred, only the edges are effected. But I'm stepping a bit too far out on the ledge... this is all conjecture. 🙂

Link to comment
Share on other sites

2 minutes ago, Brian_J said:

Think of a selection like a mask — it has transparency data in it, but it's invisible until it's applied to an object.

If you mean the marching ants selection (please specify this in your replies to avoid confusion), why would it have anything other than 100% transparent or 100% opaque per pixel alpha data if it is exactly 100% aligned to the document pixel grid, particularly when there are no layer objects selected, or there are as yet none at all?

IOW, why would it have anything different from a mask that uses only 100% opaque or 100% alpha values?

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

2 hours ago, Brian_J said:

I don't think I can add any insight beyond what's already been provided. @lepr has provided a number of explanations that seem reasonable to me and appear to explain what I'm experiencing. But ultimately, I only know what happens, predictably for me; not sure of the "why."

From my nontechnical, layperson perspective: a marquee selection is raster; when a raster object (a selection, in this case) is transformed, it gets distorted; the distortion only applies to the edges of the selection for whatever reason... like feathering; when a "distorted" (i.e., transformed) selection is used to copy an object, the attributes of all the pixels in the selection are applied to what's being copied, which results in the pasted object being feathered. The pixel attributes in the selection that are applied to the 'copy' command are only transparency, because that's all the information that's in the selection... there is no color.

The corners look like what I'd expect when blurring or feathering a rectangle.

If that was true, would making the marquee 10x10 and then making it 224x248 via the transform make it extremely stretched or something?

Link to comment
Share on other sites

2 hours ago, lepr said:

Thanks for the file. Yesterday, I gave you the explanation for a copy being feathered when a transformed Pixel Selection is active at the moment the copy is created and placed on the on the clipboard.

Your document shows the expected result for your process, when you understand how the software operates.

Here again are things for you to accept or reject:

  • a Pixel Selection is a raster object (like a mask) whose pixel values will be used to modify the opacity of some other object's pixels
  • a Pixel Selection has a transformation matrix in addition to its raster grid to enable non-destructive transformations
  • to apply the Pixel Selection to the opacity of a target object's pixels, its raster grid needs to be resampled to the target's raster space
  • the app uses bilinear resampling for that resampling 

 

Which is all good, but the expectation would be that this doesn't happen until the Ctrl+C has occurred.

Link to comment
Share on other sites

11 minutes ago, CyberAngel said:

If that was true, would making the marquee 10x10 and then making it 224x248 via the transform make it extremely stretched or something?

To the point, what exactly would it stretch if no layer was selected? It's just an area of the document pixel grid where there may or may not be any pixels.

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

2 hours ago, CyberAngel said:

If that was true, would making the marquee 10x10 and then making it 224x248 via the transform make it extremely stretched or something?

The more the size of the initial selection (made with the Marquee Tool) is changed (in the Transform panel) the more “feathering” occurs.

This is an easy one to confirm yourself by running through the process a few times making different selections sizes with the Marquee Tool.

Link to comment
Share on other sites

3 hours ago, CyberAngel said:

I was trying to understand what Brian was saying!

Sorry for the confusion. While I quoted you, like you I actually was wondering what Brian really thought was being stretched when no layer is involved.

17 minutes ago, Brian_J said:

The more the size of the initial selection (made with the Marquee Tool) is changed (in the Transform panel) the more “feathering” occurs.

This is an easy one to confirm yourself by running through the process a few times making different selections sizes with the Marquee Tool.

My question regarding that is if it should do that & why it should.

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

44 minutes ago, Brian_J said:

The more the size of the initial selection (made with the Marquee Tool) is changed (in the Transform panel) the more “feathering” occurs.

This is an easy one to confirm yourself by running through the process a few times making different selections sizes with the Marquee Tool.

But it doesn't at least not for me!

Link to comment
Share on other sites

30 minutes ago, R C-R said:

My question regarding that is if it should do that & why it should.

I have the same question.

I don’t know why it would be intentionally designed that way. I wonder if its a side effect of the underlying code, but not intentional behavior, or if Serif intentionally made it work like it does for some reason.

I suppose it could be a bug. I never posted a bug report about the issue because I figured someone else surely would have already if it wasn’t “by design.” In retrospect, I should have asked about it in the forum long ago.

I’d love it if I could easily resize a Marquee selection to my hearts content, and then copy/paste exactly what’s in the “marching ants,” pixel-perfect without feathered edges.

Link to comment
Share on other sites

2 minutes ago, Brian_J said:

I’d love it if I could easily resize a Marquee selection to my hearts content, and then copy/paste exactly what’s in the “marching ants,” pixel-perfect without feathered edges.

Well, the really confusing part in all this, is when feathering is set to zero. One has to ask why any feathering is occurring in the first place, and why add an extra 1 or 2 pixels no matter how much it is resized.

Link to comment
Share on other sites

6 hours ago, Brian_J said:

At the risk of misrepresenting something, this is my understanding...

Think of a selection like a mask — it has transparency data in it, but it's invisible until it's applied to an object.

The pixel data in a selection is in the selection itself; unrelated to layers — for example, feathering a Marquee selection has no effect on layers. Transforming a Marquee selection (a raster element) changes the pixel data, which has the effect of "feathering" the edges. When the selection is used to copy something, the data for each pixel in the selection is applied to the corresponding pixel in the object being copied.

As far as why only edge pixels are effected, I don't know. Selections seem to be a lot like masks... when a mask is blurred, only the edges are effected. But I'm stepping a bit too far out on the ledge... this is all conjecture. 🙂

You are almost there :)

Transforming the Pixel Selection object does not change its pixels at all - see my most recent video in this thread. The change happens to its transformation matrix. (Every object in an Affinity document has a transformation matrix, by the way.) In other words, the Pixel Selection is non-destructively transformed. That's the same technique by which Affinity enables non-destructive transformation of a Pixel Layer or any other object.

Because the pixels of the Pixel Selection object may be offset and/or stretched and/or rotated and/or sheared relative to the pixels of an object to which the Pixel Selection is being applied, the Pixel Selection's pixels must be resampled to get pixels which geometrically correspond with the target object's pixels. The alpha value of each pixel of the target object is multiplied by the value of the corresponding pixel of the output of the resample. The resample output is not baked into the actual Pixel Selection object, by the way.

I think I'll produce some explanatory illustrations this evening.

 

Link to comment
Share on other sites

8 hours ago, R C-R said:

Why should the transformed selection feather anything if nothing in the copy created from the layer is feathered?

IOW, in terms of this transformation matrix, in this case everything should map 1 to 1 between the selection & the layer to exact whole pixel values. Otherwise, there is no way to use a pixel selection to copy anything exactly from one pixel layer to a new one, or avoid resampling even when there is no need to do so.

See my replies to Brian and CyberAngel immediately before this reply

Link to comment
Share on other sites

8 hours ago, lepr said:

Because the pixels of the Pixel Selection object may be offset and/or stretched and/or rotated and/or sheared relative to the pixels of an object to which the Pixel Selection is being applied, the Pixel Selection's pixels must be resampled to get pixels which geometrically correspond with the target object's pixels.

But the pixels of the object do not have to be offset, stretched, or rotated unless the pixel selection is offset, stretched, or rotated while it is being applied to that object!!!!!!

This is what several of us have been saying all along & you still are not getting.

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

1 hour ago, R C-R said:

But the pixels of the object do not have to be offset, stretched, or rotated unless the pixel selection is offset, stretched, or rotated while it is being applied to that object!!!!!!

 

LOL. Nowhere did I say that pixels of the target object "have to be offset, stretched, or rotated".

Once again, as in numerous threads, you have a completely scrambled interpretation of what I've written.

1 hour ago, R C-R said:

This is what several of us have been saying all along & you still are not getting.

You think I don't understand how the software works because your mind is inverting, twisting and scrambling information that I provide into something nonsensical.

Like I said, I will put together an illustrated explanation.

 

Link to comment
Share on other sites

2 hours ago, lepr said:

Nowhere did I say that pixels of the target object "have to be offset, stretched, or rotated".

That's the point! There is nothing to be offset, stretched, or rotated unless the selection is being applied to a layer, which only happens if a layer (what you call a target object) is selected when the marching ants selection (& its transformation matrix) is being transformed.

Again, please consider the example of a new document that initially has no layers at all. You can still create a marching ants selection & then move or resize it, so at that time what is there in the document to apply this transformation matrix to? There is no target object, no layer, nothing at all but a selection defining an area of the document that in the future may or may not include any pixel data to transform.

Whether left at its initial size or resized afterwards, if it includes only whole document pixels & likewise the part of the target layer it encloses also includes only whole pixels and none of those layer object pixels is partially transparent, why is there any need to resample anything in a way that results in partially transparent pixels when it is copied & pasted?

2 hours ago, lepr said:

You think I don't understand how the software works because your mind is inverting, twisting and scrambling information that I provide into something nonsensical.

I am not the only one who does not understand what point you are trying to make. We have all agreed that nothing should or does happen to the document when the marching ants selection is transformed if no layer (target object) is selected at that time, so there is no need to belabor that point. The big question here is why when there is nothing partially transparent within the pixel layer defined by the marching ants selection are there any partially transparent pixels in the copied & pasted result when everything involved (IOW, the marching ants, the selected part of the target layer, & the position of the pasted layer) is perfectly pixel aligned.

This simply should not happen because it makes it ridiculously hard to get an accurate copy of a selected group of layer pixels without resorting to elaborate workarounds.

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

30 minutes ago, R C-R said:

Again, please consider the example of a new document that initially has no layers at all. You can still create a marching ants selection & then move or resize it, so at that time what is there in the document to apply this transformation matrix to?

The Pixel Selection's transformation matrix is only ever applied to the Pixel Selection's own raster grid of pixels. For 8 pages now you have exhibited a mental block preventing you from being able to grasp the concept of the Pixel Selection itself being a raster object, or in other words, a rows by columns grid of pixels. Every time I mention the raster grid or pixels of the Pixel Selection, you mistakenly interpret that as the raster grid or pixels of a Pixel Layer that is also in the document. As long as you have that mental block, you will think I am talking nonsense.

As for the rest of your message from which I quoted, there is no point in me explaining anything to you further until you deal with that mental block.

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.