Paste as Selection

Ask for help and post your question on how to use XnView MP.

Moderators: XnTriq, helmut, xnview

User avatar
xnview
Author of XnView
Posts: 43833
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Paste as Selection

Post by xnview »

do you think that paste need to use default size of image instead to adapt to selection?
Pierre.
cday
XnThusiast
Posts: 4021
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Paste as Selection

Post by cday »

xnview wrote: Mon Jul 25, 2022 12:31 pm do you think that paste need to use default size of image instead to adapt to selection?
I think that would probably be better, but the problem has two parts:

1. To paste the clipboard image at its existing dimensions;

2. To be able to easily place the pasted image at any desired position on the canvas.

That would be the usual case, but possibly there might also sometimes be a need to paste into a resized selection. Helmut?

I am not familiar with the Photoshop and Paintshop Pro interface, but it seems to be a well-established and intuitive way to implement the main need, would it be difficult to implement?
User avatar
helmut
Posts: 8705
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: Paste as Selection

Post by helmut »

I think both use cases should be supported by XnView:
If user has selected an area and then pastes, the contents of the clipboard are pasted into that selection (current behaviour).

If user hasn't selected an area and then pastes, the contents of the clipboard are pasted in original size and ratio at 0,0 position and pasted contents (selection) can be moved and resized (new behaviour).
irhorwood
Posts: 5
Joined: Wed Jul 20, 2022 7:59 am

Re: Paste as Selection

Post by irhorwood »

In PSP, using 'paste as selection' into the new image, the copied clipboard content is placed at it's original dimensions at dead centre of new image. It retains a selection marquee around it and can be re-positioned at will using drag and drop, then a right click whilst in selection tool pastes it at the desired location.
Nicko Bellick
Posts: 1
Joined: Fri Jul 22, 2022 2:42 pm

Re: Paste as Selection

Post by Nicko Bellick »

Hi guys! I had the same issue. Very happy to find the solution here. Thanks a lot!
User avatar
user0
XnThusiast
Posts: 1645
Joined: Sat May 09, 2015 9:37 am

Re: Paste as Selection

Post by user0 »

+1

quick sum:
  • add functionality to reposition pasted image via retaining selection
    • if there is selection in target - resize source to fit selection (existing behavior, leave it as feature)
      - add pasteKeepRatio=true into Settings
    • if there is no selection in target - paste source as is
      the same way as 'Add watermark' works

few additional suggestions:
  • if target is zoomed - paste in currently visible top-left corner (same as in mspaint), not top-left corner (0,0px)
  • if source is larger than target - increase target's canvas size (same as in mspaint)
    maybe add that option to Settings, but I've never wanted it disabled

ps. same for Draw and maybe add functionality to Rotate pasted image there (not sure why it is not possible to rotate in Viewer)


Last bumped by user0 on Tue Jan 02, 2024 10:57 am.