Jump to content

Recommended Posts

Posted

With the attached image, if I copy part of it, and then go to "File" - "New From Clipboard", the new image has a 1px transparent border added to the copied content.

When copying from other images, only the copied content is in the new image (as expected).

So there's something in how this specific "Tent.jpg" file is composed that is confusing Photo 2.

 

Windows 10 Home 64 22H2 19045.2251

Hardware Acceleration: "OpenCL compute acceleration" enabled

No unusual software/hardware in use.

No recent system changes (other than upgrading to Affinity 2).

 

Tent.jpg

Bug1.png

Bug2.png

Posted

I'm guessing the tent image you are copying from isn't aligned to whole pixels. Align the source image to whole pixels and see if that takes care of it.

Windows 10 22H2, 32GB RAM | Affinity Designer/Photo/Publisher 2 (MSI/EXE)

Posted (edited)
8 minutes ago, Brian_J said:

I'm guessing the tent image you are copying from isn't aligned to whole pixels. Align the source image to whole pixels and see if that takes care of it.

Thanks for the suggestion.  Though I'm new to Photo, so I'm not sure what you mean by "align the source image to whole pixels".  I tried the operation again with "Force Pixel Alignment" enabled, but got the same results.  Is that what you meant?

Edited by TrickyWidget
Posted

Cool, thanks Chris.

@TrickyWidget What I meant by "align the source image to whole pixels" is:

  1. In the image you're copying from, select the Move Tool.
  2. Click on the tent image layer to select it.
  3. In the Transform Panel, make sure the X and Y values are whole pixels (i.e., no decimals).

After I posted my comment, I took another look at your screenshots and thought, maybe my idea isn't likely to be the issue. Copy and paste worked fine for me... I didn't have the issue you're having. I was able to kind of reproduce your results by moving the tent image 0.5 px on both the X and Y coordinates, then copying. But the resulting New From Clipboard file was 201 x 201... so probably not the issue you're having.

The fact that the tent image is a locked Background layer means it's likely you opened the file in Photo and haven't moved it accidentally, in which case it should be aligned to pixels.

I don't know what the bug is that Chris mentioned or if would do any good to close and reopen the tent photo and trying the copy/paste again.

Windows 10 22H2, 32GB RAM | Affinity Designer/Photo/Publisher 2 (MSI/EXE)

Posted
2 hours ago, TrickyWidget said:

"With the attached image, if I copy part of it, and then go to "File" - "New From Clipboard", the new image has a 1px transparent border added to the copied content."


How are you getting the 200px × 200px selection in the Transform panel?

Are you:

A) Dragging the Rectangular Marquee tool until it matches 200px × 200px precisely, then letting go of the mouse button?

B) Dragging the Rectangular Marquee tool loosely, then typing 200px × 200px in the Transform panel to get those precise dimensions?

If the answer is "B", then that is likely your issue, as unfortunately the Rectangular Marquee tool does not work like a vector shape.  You will need to use the Rectangle tool (shape tool) and create a selection from that instead, as the Rectangular Marquee tool and Elliptical Marquee tool are pretty poor.

 

Posted
12 minutes ago, - S - said:

If the answer is "B", then that is likely your issue, as unfortunately the Rectangular Marquee tool does not work like a vector shape.

Ah, that makes a difference!  I was typing in the number and got the bug, while dragging exactly does produce the expected results.  However, my report was an attempt to simply the problem I first had.  What I'm actually doing is using the Flood Select tool to copy an irregular area, and then when I paste "New From Clipboard", the resulting image also has the added 1px transparent border.  Though it sounds like the underlying mechanics could still be related to what you've pointed out.  Thanks for the tip!

@Chris B Some more details here that may be relevant.  Thanks!

Posted
1 hour ago, TrickyWidget said:

"…However, my report was an attempt to simply the problem I first had.  What I'm actually doing is using the Flood Select tool to copy an irregular area, and then when I paste "New From Clipboard", the resulting image also has the added 1px transparent border."


Unless you're resizing the selection, that sounds like a slightly different issue.

With the Flood Select tool issue, does it occur regardless of whether the Antialias setting in the context toolbar along the top is enabled or disabled?  Or does it only occur when Antialias is enabled?

 

 

Posted

It may also be important to check your application Preferences, User Interface, and increase the number of decimal places displayed for pixel units. I suggest at least 3 decimal places. If your X and Y coordinates are not integers, or your W and H values are not integers, you can get extra pixels when exporting and (just a guess) when copying/pasting.

-- 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

Posted
1 hour ago, - S - said:

With the Flood Select tool issue, does it occur regardless of whether the Antialias setting in the context toolbar along the top is enabled or disabled?

Well, I'm not sure.  I'm reasonably confident that I haven't touched the Antialias setting, and it was off.  But with it off, I now can't reproduce the bug using Flood Select.  But with it on, there is now 2 pixels of transparent border added (instead of 1px before).

Regardless, I think it's reasonable to expect that the displayed selection should only contain the displayed selection.  I'm just not sure if there are similar but distinct bugs for the Marquee Tool and the Flood Select Tool, or if they're different variations of the same bug.

Posted
2 hours ago, TrickyWidget said:

Regardless, I think it's reasonable to expect that the displayed selection should only contain the displayed selection. 

But I believe you'll find that is not the way it's designed to work. The marching ants visually give you two regions where (speaking roughly, not with great technical precision):

  • The pixels inside the ants are >= 50% selected and
  • The pixels outside the ants are < 50% selected.

But when you Copy a selection, you get all the pixels that are > 0% selected. That could be a bunch of pixels outside the ants, if you don't have a clean, non-aliased, non-feathered selection. And when you're considering the Selectiion Brush or Flood Selection, you need to worry about the Tolerance settings, too.

 

-- 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

Posted
6 minutes ago, walt.farrell said:

But when you Copy a selection, you get all the pixels that are > 0% selected.

That is going to drive me right out of my ever-loving mind.  😕  Everything I do is always pixel-exact.  I don't suppose there's a handy option to disable all that partial-pixel craziness?

Posted
52 minutes ago, TrickyWidget said:

That is going to drive me right out of my ever-loving mind.  😕  Everything I do is always pixel-exact.  I don't suppose there's a handy option to disable all that partial-pixel craziness?

I think: It happens with selection lines that are not horizontal or vertical, or that use feathering. So stick with the Rectangular Marquee Selection Tool and you're pretty safe.

But others may have better advice for you.

-- 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

  • Staff
Posted
15 hours ago, - S - said:

You will need to use the Rectangle tool (shape tool) and create a selection from that instead

That works but in my opinion it's certainly not a solution. I think we need to improve the marquee selection to be honest.

Ctrl clicking the thumbnail also adds the selection to the shape, you can then select the layer you want to cut from and perform the operation but it's just not ideal... 

  • 7 months later...
Posted

I’ll add my two cents, too, except I’m on macOS 13.4.1, Affinity Photo 2.1.1.

All units are in pixels.

The marquee tool seems to only start adding borders when it is resized to 500x500 or larger, and the number of pixels it adds is not always 1 to each side, sometimes it adds 2 to two opposing sides only (ie. 500x504), other times it gets whacky and does something like 1016x1008 to a selection that’s resized to 1000x1000.

"New from Clipboard" was used in the incident of 1016x1008 to paste the image, the image came out to be rather interesting, in that the right hand side of the image is 3 different sections put together with some sort of smoothing/transitioning effect between sections, it starts with the image the marquee selection copied from followed by smoothing, the next section is the transparent background checkerboard followed by smoothing transition again, and the final part is the red overlay you see in refine selection when the preview is set to overlay, the entire part of the image + smoothing + checkerboard + smoothing + overlay is about 1/5 of the entire width of the image, the other 3 sides look similar to the right side, too, but much smaller in width or height, probably around 10-20px per side.

Unfortunately I didn’t save the file, there’s nothing to upload.

The refine selection function was never used when using the marquee selection tool.

Posted
14 minutes ago, HOOman said:

when it is resized to 500x500 or larger

Details matter - how do you set the size?
 

 

On 11/21/2022 at 4:47 PM, - S - said:

Are you:

A) Dragging the Rectangular Marquee tool until it matches 200px × 200px precisely, then letting go of the mouse button?

B) Dragging the Rectangular Marquee tool loosely, then typing 200px × 200px in the Transform panel to get those precise dimensions?

 

 

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.

 

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.