Clone tool
Moderators: helmut, XnTriq, xnview
Clone tool
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?
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?
Re: Clone tool
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!
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!

Re: Clone tool
Are you sure you could see clearly enough to alter the image? 
Thanks for the tip.

Thanks for the tip.
Re: Clone tool
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.
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.
Re: Clone tool
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.
Re: Clone tool
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? 

Re: Clone tool
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.
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.
Re: Clone tool
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!
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!

Re: Clone tool
its pretty straight forward realization (from UI point of view)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?![]()
- 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
Re: Clone tool
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.
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.
Re: Clone tool
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.
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.
Re: Clone tool
Well yes, the window can be dragged to the full height and width of the screen, maximised that way...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.
Clone tool is subset of Brush tool, so I doubt there is any better place for it rather than Draw mode.
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.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.
Re: Clone tool
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
).
- 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.
- if Draw mode exists - it shall be the only source for things that gravitate to "drawing/retouching" side of editing (there non right now

- 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.
Re: Clone tool
One click, resize the default Draw window, find the relevant icon...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.

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