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: 42539
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: 3894
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
Moderator
Posts: 8702
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: 1298
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 it (existing behviour, leave it as feature)
      - add pasteKeepRatio=true into Settings
    • if there is no selection in target - paste source as is

few additional suggestions:
  • if target is zoomed - paste in currently visible top-left corner, not 0,0px (same as in mspaint)
  • if source is larger than target - increse target's canvas size (same as in mspaint).
    Maybe add this as an option in Settings, but I never wished it to be switched off

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