CyberAngel Posted May 21, 2023 Author Posted May 21, 2023 11 hours ago, lepr said: There are handles for geometrically transforming a Pixel Selection (PS) when you enable Quick Mask mode and activate the Move Tool. Quick Mask mode allows you to manipulate a PS as if it were a raster mask, including painting and applying destructive filters, because a PS and a raster mask are two manifestations of one thing - a raster grid of values used for modifying the opacity of other objects or effects, and a transformation matrix. A PS has a transformation matrix, as do other raster objects in Affinity, and so geometrically transforming the selection is non-destructive (that is, its original pixels are preserved while the entries of the transformation matrix are changed). You can exit Quick Mask mode after performing a transformation and then re-enter it to see that no blurring of the PS has occurred. However, when the PS is actually used, for example, when duplicating a region of an image or creating a mask, values for modifying the resulting object's opacity are calculated by bilinear resampling of the PS to the destination space. That bilinear resampling may introduce partial opacity where you were expecting a hard boundary between full opacity and full transparency. But I am not asking to transform the image, I am asking to transform the marquee only! Quote
CyberAngel Posted May 21, 2023 Author Posted May 21, 2023 3 hours ago, R C-R said: Just use the OP's test file. With no layer selected, change the selection size to 224 x 248 px in the Transform panel (the selection values should be shown there if you select one of the marquee selection tools). Now change the X & Y values until the selection is directly over the 73389.png layer with the top left edge positioned (in this file) at 608 & 631. Copy & there should be no sub pixel issues. Admittedly, that last positioning step is a bit fiddly, so I usually use the Quick Mask method to move it into place & together with snapping & Force Pixel alignment, I zoom in as needed to make sure it remains pixel perfect. Copied & pasted layer added to test with added paste.afphoto to show what I get. I opened this up and the two images to the left have exactly what I am wanting to avoid, Here is the first image, and if you look at the transform it is 225 wide and not 224  Here is the 2nd image where it appears to have been feathered.   Quote
R C-R Posted May 21, 2023 Posted May 21, 2023 3 minutes ago, CyberAngel said: Here is the 2nd image where it appears to have been feathered. Did you try the workaround I just posted? Quote All 3 1.10.8, & all 3 V2.6 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
CyberAngel Posted May 21, 2023 Author Posted May 21, 2023 Just now, R C-R said: Did you try the workaround I just posted? Not yet I am still catching up, but as of right now it is still more complicated than it needs to be. I mean for crying out loud, Notepad I can make a Selection and Hold down the Shift Key and use the arrow keys to resize my selection and it is 30 years old application. Other Applications can do something as simple as this, why is Affinity so problematic? The point I am raising is that making a selection and adjusting its size is the staple of copying and pasting, but yet it is not here.. Why!  Quote
lepr Posted May 22, 2023 Posted May 22, 2023 17 hours ago, CyberAngel said: But I am not asking to transform the image, I am asking to transform the marquee only! Yes, I know that!! I've written nothing to contradict that. You appear to be misunderstanding me frequently. Not only you. It must be my poor communication skills. Thankfully, some people in the forum do understand my messages. Â Quote
lepr Posted May 22, 2023 Posted May 22, 2023 20 hours ago, R C-R said: I am both moving & resizing the marching ants pixel selection. OK, my mistake, sorry. I was imagining an explanation for you not seeing the feathering that results from using a resized Pixel Selection. Forgot about your eyesight problems. 20 hours ago, R C-R said: I am just doing that while no layer is selected so it has no effect on any pixel layer. If you want to resize the selection without it causing any issues with any pixel layer, just make sure no layer is selected while you do that. OK 20 hours ago, R C-R said: Then, once the selection's size & position is what you want to copy from a pixel layer, select that layer in the Layers panel & do the copy. Your copy will have feathered edges. The feathering will extend outside the marching ants. The copy will be larger than the marching ants suggested it would be. The problem! Quote
R C-R Posted May 22, 2023 Posted May 22, 2023 1 minute ago, lepr said: Forgot about your eyesight problems. LOL! It isn't so much my eyesight as me not zooming in far enough on that very large document to get a good look at the edges of what I pasted. 3 minutes ago, lepr said: Your copy will have feathered edges. The feathering will extend outside the marching ants. The copy will be larger than the marching ants suggested it would be. The problem! So do you think this is a bug or intended behavior? Quote All 3Â 1.10.8, &Â all 3Â V2.6Â 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
lepr Posted May 22, 2023 Posted May 22, 2023 Just now, R C-R said: So do you think this is a bug or intended behavior? In Affinityspeak, it is "by design". It is a consequence of the software performing as designed. Quote
R C-R Posted May 22, 2023 Posted May 22, 2023 1 minute ago, lepr said: In Affinityspeak, it is "by design". It is a consequence of the software performing as designed. How so? The Transform panel shows the selection as whole pixels & pixel aligned, so where is the feathering coming from? And why is it that my workaround works? Quote All 3Â 1.10.8, &Â all 3Â V2.6Â 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
lepr Posted May 22, 2023 Posted May 22, 2023 1 hour ago, R C-R said: How so? The Transform panel shows the selection as whole pixels & pixel aligned, so where is the feathering coming from? I already wrote about a Pixel Selection being a raster grid plus transformation matrix, and that it is a bilinear resampling of the Pixel Selection that provides values for modifying the opacity of whatever raster object is being created (such as a mask or a copy of a Pixel object) while the Pixel Selection is active. 2 hours ago, R C-R said: And why is it that my workaround works? Your 'workaround' appeared to be you using the Eraser Tool to remove a feathered edge of a Pixel object. The app reports the dimensions of a Pixel object as the size of the bounding rectangle that encloses all of its pixels that have greater than zero opacity. The Eraser set the opacity of the rightmost column of these pixels to zero, so the reported width of the Pixel object reduced by one pixel. Quote
R C-R Posted May 22, 2023 Posted May 22, 2023 1 minute ago, lepr said: I already wrote about a Pixel Selection being a raster grid plus transformation matrix, and that it is a bilinear resampling of the Pixel Selection that provides values for modifying the opacity of whatever raster object is being created (such as a mask or a copy of a Pixel object) while the Pixel Selection is active. But if every pixel of the selection is perfectly aligned on only fully opaque pixels, why is any resampling necessary, be it bilinear or otherwise? Remember, the marching ants selection does not belong to or is a part of any particular layer. It just defines an area where there may or may not be any pixels on any layer. IOW, it is independent of the content of any layer. Quote All 3Â 1.10.8, &Â all 3Â V2.6Â 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
lepr Posted May 22, 2023 Posted May 22, 2023 4 minutes ago, R C-R said: But if every pixel of the selection is perfectly aligned on only fully opaque pixels, why is any resampling necessary, be it bilinear or otherwise? Remember, the marching ants selection does not belong to or is a part of any particular layer. It just defines an area where there may or may not be any pixels on any layer. IOW, it is independent of the content of any layer. Say you make an initial Pixel Selection (PS) of 10 px x 10 px. The PS raster grid contains 100 pixels, each with normalised value 1.0, plus an initial transformation matrix describing its location relative to the document raster space. When you scale that PS to 20 px x 20px in the document raster space (by using Transform Panel or using handles in Quick Mask mode), the PS raster grid of 100 pixels remains unaltered, it does not become 400 pixels, but the accompanying transformation matrix is changed so that it describes the scaling. Now, if you copy a Pixel object (an untransformed one, to keep the example simple), the 100 pixels of the PS needs to be resampled to 400 pixels in the Pixel object's raster space in order to provide a value for scaling the opacity of each pixel of the new Pixel object on the clipboard/pasteboard. Quote
walt.farrell Posted May 22, 2023 Posted May 22, 2023 3 minutes ago, lepr said: Say you make an initial Pixel Selection (PS) of 10 px x 10 px. The PS raster grid contains 100 pixels, each with normalised value 1.0, plus an initial transformation matrix describing its location relative to the document raster space. When you scale that PS to 20 px x 20px in the document raster space (by using Transform Panel or using handles in Quick Mask mode), the PS raster grid of 100 pixels remains unaltered, it does not become 400 pixels, but the accompanying transformation matrix is changed so that it describes the scaling. Now, if you copy a Pixel object (an untransformed one, to keep the example simple), the 100 pixels of the PS needs to be resampled to 400 pixels in the Pixel object's raster space in order to provide a value for scaling the opacity of each pixel of the new Pixel object on the clipboard/pasteboard. That would be true, I think, if you have a pixel layer active when you transform the selection (or, possibly, when you draw the selection marquee). But as far as I can see, if you do not have a pixel layer active when making and transforming the selection, the selection marquee simply grows if you transform it using the Transform panel. And then if you make a pixel layer active, and perform a copy, you simply get those original pixels copied with no scaling. This is what @R C-R is saying, I think, and is a situation that as far as I can tell you are not taking into account. R C-R 1 Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC:    Desktop:  Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090   Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.    Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad:  iPad Pro M1, 12.9": iPadOS 18.3.1, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1
R C-R Posted May 22, 2023 Posted May 22, 2023 3 minutes ago, lepr said: When you scale that PS to 20 px x 20px in the document raster space (by using Transform Panel or using handles in Quick Mask mode), the PS raster grid of 100 pixels remains unaltered, it does not become 400 pixels, but the accompanying transformation matrix is changed so that it describes the scaling. Nonsense! The marching ants pixel section absolutely should change to 400 pixels! It isn't being "scaled," it's being resized. The only transformation that should occur is when it is resized when a pixel layer is selected. Otherwise it is not attached to, a part of, or in any way should it have any effect on any layer because it is not in & of itself a part of any layer. Quote All 3Â 1.10.8, &Â all 3Â V2.6Â 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
R C-R Posted May 22, 2023 Posted May 22, 2023 1 minute ago, walt.farrell said: This is what @R C-R is saying, I think, and is a situation that as far as I can tell you are not taking into account. Exactly so! Quote All 3Â 1.10.8, &Â all 3Â V2.6Â 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
lepr Posted May 22, 2023 Posted May 22, 2023 21 minutes ago, walt.farrell said: That would be true, I think, if you have a pixel layer active when you transform the selection (or, possibly, when you draw the selection marquee). But as far as I can see, if you do not have a pixel layer active when making and transforming the selection, the selection marquee simply grows if you transform it using the Transform panel. And then if you make a pixel layer active, and perform a copy, you simply get those original pixels copied with no scaling. This is what @R C-R is saying, I think, and is a situation that as far as I can tell you are not taking into account. You and R C-R are completely misunderstanding me, as is so very often the case. As I keep saying, my poor communication skills are probably to blame. Â Quote
R C-R Posted May 22, 2023 Posted May 22, 2023 1 minute ago, lepr said: You and R C-R are completely misunderstanding me, as is so very often the case. As I keep saying, my poor communication skills are probably to blame. To simplify this as much as I can, I am asking if you think that when no layer is selected changing the size or position of the marching ants pixel selection should have any effect on any layer. Quote All 3Â 1.10.8, &Â all 3Â V2.6Â 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
lepr Posted May 22, 2023 Posted May 22, 2023 20 hours ago, R C-R said: Nonsense! The marching ants pixel section absolutely should change to 400 pixels! It isn't being "scaled," it's being resized. The only transformation that should occur is when it is resized when a pixel layer is selected. Otherwise it is not attached to, a part of, or in any way should it have any effect on any layer because it is not in & of itself a part of any layer. Of course the marching ants change when a Pixel Selection is transformed. The marching ants are a visualisation aid so the user can see the extent of a Pixel Selection's raster grid transformed and resampled into the document raster space. I agree that a Pixel Selection is not attached to or a part of any layer/object in the document. A Pixel Selection is an independent raster object in the document. You have (once again) misunderstood me if you think I have written anything to the contrary. A Pixel Selection will have an effect on the content of a raster object (Pixel Layer or Mask) that is created or edited while the Pixel Selection is active. Surely that's the reason Pixel Selections can be created. Â Quote
lepr Posted May 22, 2023 Posted May 22, 2023 1 hour ago, R C-R said: To simplify this as much as I can, I am asking if you think that when no layer is selected changing the size or position of the marching ants pixel selection should have any effect on any layer. This must be a trick question. OK, I'll bite. No effect on layers/objects existing at that moment, other than changing the transformation matrix of the Pixel Selection object itself. Quote
walt.farrell Posted May 22, 2023 Posted May 22, 2023 36 minutes ago, lepr said: No effect on layers/objects existing at that moment, other than changing the transformation matrix of the Pixel Selection object itself. In that case, after the marquee selection is Transformed (by the Transform panel), how would one see the effect of the changes to that transformation matrix? Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC:    Desktop:  Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090   Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.    Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad:  iPad Pro M1, 12.9": iPadOS 18.3.1, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1
R C-R Posted May 22, 2023 Posted May 22, 2023 30 minutes ago, lepr said: This must be a trick question. OK, I'll bite. No effect on layers/objects existing at that moment, other than changing the transformation matrix of the Pixel Selection object itself. There is no trick. But neither is there a "transformation matrix" applied to anything (because at that time there is nothing selected to apply it to!!!!) just a changed size and/or position of the marching ants selection. And if that selection is perfectly pixel aligned (no fractional pixel values in the Transform panel for X,Y, W, or H when sufficient decimal places are displayed) and the layer it is later applied to is also pixel aligned, then there is no need to resample anything, no scaling, no antialiasing required. Also, I think someone mentioned that there may be a (new?) bug in the Transform panel not showing fractional pixels when there are, but even if there is it should not matter if whole pixel values are entered in the panel for everything. Clear enough? Quote All 3 1.10.8, & all 3 V2.6 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
CyberAngel Posted May 22, 2023 Author Posted May 22, 2023 6 hours ago, lepr said: In Affinityspeak, it is "by design". It is a consequence of the software performing as designed. Disagree. What makes you think it is performing as designed? Quote
R C-R Posted May 22, 2023 Posted May 22, 2023 6 minutes ago, walt.farrell said: In that case, after the marquee selection is Transformed (by the Transform panel), how would one see the effect of the changes to that transformation matrix? More to the point, what could it effect if no layer is selected? Quote All 3Â 1.10.8, &Â all 3Â V2.6Â 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
CyberAngel Posted May 22, 2023 Author Posted May 22, 2023 3 hours ago, lepr said: I already wrote about a Pixel Selection being a raster grid plus transformation matrix, and that it is a bilinear resampling of the Pixel Selection that provides values for modifying the opacity of whatever raster object is being created (such as a mask or a copy of a Pixel object) while the Pixel Selection is active. Then it should be feathered without changing the size of the marquee then! Also, feathering should not add an extra pixel to the width either. Quote
CyberAngel Posted May 22, 2023 Author Posted May 22, 2023 2 hours ago, lepr said: Say you make an initial Pixel Selection (PS) of 10 px x 10 px. The PS raster grid contains 100 pixels, each with normalised value 1.0, plus an initial transformation matrix describing its location relative to the document raster space. When you scale that PS to 20 px x 20px in the document raster space (by using Transform Panel or using handles in Quick Mask mode), the PS raster grid of 100 pixels remains unaltered, it does not become 400 pixels, but the accompanying transformation matrix is changed so that it describes the scaling. Now, if you copy a Pixel object (an untransformed one, to keep the example simple), the 100 pixels of the PS needs to be resampled to 400 pixels in the Pixel object's raster space in order to provide a value for scaling the opacity of each pixel of the new Pixel object on the clipboard/pasteboard. But you haven't copied anything, all you are doing is laying down the marquee tool. So it should not be doing anything at that point! Quote
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.