Clone tool

Ideas for improvements and requests for new features in XnView MP

Moderators: XnTriq, helmut, xnview

berwyn
Posts: 8
Joined: Tue Aug 08, 2023 12:56 am

Clone tool

Post by berwyn »

I've just found that XnView MP now works in Linux!
This is great -- I finally have a substitute for IrfanView that works in Linux, and XnView has most of what IrfanView had, plus a few extras.

The only thing I really miss is a clone tool in draw mode like IrfanView had. Any chance of that?
cday
XnThusiast
Posts: 3884
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Clone tool

Post by cday »

A Clone tool could be a useful addition, I haven't looked at the Irfanview implementation as I'm also normally in Linux and have read about security risks running Windows software in Wine.

But it is now possible to achieve about the same result by copying a selection to the clipboard, moving the selection to the desired location and then pasting the selection. Used it recently to change the date of an eye test certificate! :D
berwyn
Posts: 8
Joined: Tue Aug 08, 2023 12:56 am

Re: Clone tool

Post by berwyn »

Are you sure you could see clearly enough to alter the image? :wink:

Thanks for the tip.
cday
XnThusiast
Posts: 3884
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Clone tool

Post by cday »

The above technique can be used to clone an area while preserving the size, in the above case by copying a hand-written digit to change the year.

Or when cleaning an image such as a scan, by copying a clean area and then resizing the selection as needed: I've cleaned large areas that way, making multiple different-sized pastes of the clipboard. And when cleaning scans of archived accounts, extended the ruled vertical grid lines to 'repair' damaged sheet edges.
cday
XnThusiast
Posts: 3884
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Clone tool

Post by cday »

A 'Clone' or 'Clone stamp' tool does operate in a different way to that described above and looks like it could be a useful addition to XnView MP's existing copy and paste options, enabling the optimum tool to be used in any editing situation.
cday
XnThusiast
Posts: 3884
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Clone tool

Post by cday »

Maybe user0 would like to review possible clone tool interfaces, and suggest how a Clone tool might best be implemented, rather than possibly critique Pierre's initial design if he decides to add the function? :D
berwyn
Posts: 8
Joined: Tue Aug 08, 2023 12:56 am

Re: Clone tool

Post by berwyn »

You seem to be very excited by this conversation, @cday. Since it's only me and you on this chain, I guess that by "user0" you mean me.

Allow me to clarify. My suggestion was not a critique: it was a feature request. "Irfanview's clone tool" is an adequate description of what I'm suggesting.
cday
XnThusiast
Posts: 3884
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Clone tool

Post by cday »

No, user0 is a member who posts very regularly, and has recently particularly suggested improvements to existing XnView MP user interface designs, many adopted by Pierre.

So rather than Pierre possibly providing an initial implementation, and user0 quite possibly suggesting changes, this is a serious suggestion that he review possible designs and then suggest one or more suggested designs. Could benefit everyone! :D
berwyn
Posts: 8
Joined: Tue Aug 08, 2023 12:56 am

Re: Clone tool

Post by berwyn »

Indeed. Thanks.
User avatar
user0
XnThusiast
Posts: 1294
Joined: Sat May 09, 2015 9:37 am

Re: Clone tool

Post by user0 »

cday wrote: Thu Aug 10, 2023 8:36 am Maybe user0 would like to review possible clone tool interfaces, and suggest how a Clone tool might best be implemented, rather than possibly critique Pierre's initial design if he decides to add the function? :D
its pretty straight forward realization (from UI point of view)
- add "Clone stamp tool" icon in Draw mode

tool params:
- brush size
- brush hardness

controls - same as in PS:
1. Alt+LMB to set source
2. LMB to draw

clone_stamp_tool.png
You do not have the required permissions to view the files attached to this post.
cday
XnThusiast
Posts: 3884
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Clone tool

Post by cday »

Thanks user0 for your suggested interface, I've never used a clone tool so I'll leave the interface to you and Pierre!

You suggest including Clone in Draw, which I suppose is a natural place, but I wonder if it should also perhaps be available in one of the main menus, where a better view of the opened image is available than in the smaller Draw preview window. Thinking aloud, I don't know if it would be practical to provide either a 'maximise' or a 'fullscreen' option for the Draw window??

After the Text and Watermark options were added in Draw, they were also added to the main menus, where they are more convenient if the need is to perform either of those functions rather than to actually draw. Hopefully, much of the new Clone code could also be used to provide those options.
User avatar
user0
XnThusiast
Posts: 1294
Joined: Sat May 09, 2015 9:37 am

Re: Clone tool

Post by user0 »

I would not call Draw a "preview window" since it's resizable and can be maximized (size will be memorized as well).
Also not sure if fullscreen option is really necessary as there are buttons at the bottom of Draw window.

Clone tool is subset of Brush tool, so I doubt there is any better place for it rather than Draw mode.
cday
XnThusiast
Posts: 3884
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Clone tool

Post by cday »

user0 wrote: Sat Aug 12, 2023 4:07 pm I would not call Draw a "preview window" since it's resizable and can be maximized (size will be memorized as well).
Also not sure if fullscreen option is really necessary as there are buttons at the bottom of Draw window.
Well yes, the window can be dragged to the full height and width of the screen, maximised that way...
Clone tool is subset of Brush tool, so I doubt there is any better place for it rather than Draw mode.
cday wrote: Fri Aug 11, 2023 12:42 pm After the Text and Watermark options were added in Draw, they were also added to the main menus, where they are more convenient if the need is to perform either of those functions rather than to actually draw.
I think that when a user only wants to make a simple edit, maybe to clean marks from an image, it would generally be more convenient to make it directly in the editor window. The Text and Watermark options were I believe present in the XnView Classic menus.
User avatar
user0
XnThusiast
Posts: 1294
Joined: Sat May 09, 2015 9:37 am

Re: Clone tool

Post by user0 »

There shall be some separation of concerns.
- if Draw mode exists - it shall be the only source for things that gravitate to "drawing/retouching" side of editing (there non right now :D ).
- if there is no Draw mode, fine, add Draw menu and group all related stuff there.

Guess main benefits of Draw as separate thing are:
- grouping instruments on one panel for faster access and
- potential expansion to more complicate things, eg layers.

tbh, i'm not a big fan of duplicating "Add text/watermark" into Viewer's menu, why not add "Add rectangle/ellipse/arrow/etc." there than (params via horizontal panel)? as for me, they have same importance.

another example - why "Film simulation" is at the root level in Effects menu? it shall be in "Misc" group inside "Effects.." dialog (like in Batch mode).
I'm pretty sure somebody asked for this very important [for him] effect to be one click closer. This path will lead to the mess.
cday
XnThusiast
Posts: 3884
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Clone tool

Post by cday »

user0 wrote: Sat Aug 12, 2023 7:33 pm I'm pretty sure somebody asked for this very important [for him] effect to be one click closer. This path will lead to the mess.
One click, resize the default Draw window, find the relevant icon... :wink:

Maybe conceptually not perfect, but the existing interface with some practical advantages when working?

Also an issue that users might not recognise watermarking an image as a 'Draw' operation, and believe that the function is not supported.

Let's talk about persistence of settings, never considered when a new capability is added, usually eventually added later after user requests... :D