Make 'Copy as...' creator to copy image into clipboard with format convert (not the whole file but, as-it-is-displayed)

Ideas for improvements and requests for new features in XnView MP

Moderators: helmut, XnTriq, xnview

Post Reply
Piotr Osada
Posts: 3
Joined: Thu May 15, 2025 3:42 pm

Make 'Copy as...' creator to copy image into clipboard with format convert (not the whole file but, as-it-is-displayed)

Post by Piotr Osada »

As of now: XnView MP (1.8.8 -- 2025.04.14)

Please develop a context menu function, the 'Copy as...', to copy an image into OS clipboard that enables us to:
  • convert format
  • resize
  • crop
    (apply frame from viewing module (Open Ctrl+O))
  • set other conversion settings
    (maybe by redirecting to batch convert settings with possibility to copy to clipboard and/or return to 'Copy as...' dialog)
  • apply presets from batch convert
  • remove metadata
    (maybe even choose which data to delete)


Similar functionality, I'm describing, is available e.g. in OriginPro.
https://www.originlab.com/
OriginPro 'Copy Graph as Image' dialog.png
OriginPro 'Copy Graph as Image' dialog.png (26.04 KiB) Viewed 262 times
1) OriginLab 'Copy Graph as Image...' dialog.mp4
(1.53 MiB) Downloaded 10 times

It may seem that pointed function is enough covered by simple: crop, copy and paste. But this not works as intended in many apps. E.g.:
  • MS Word
  • MS PowerPoint
  • LibreOffice
It does work (only?) in MS Paint (11.2503.381.0). So it looks like there is some "communication" between apps that is under the hood.
XN to MS Paint image insertion.jpg
XN to MS Paint image insertion.jpg (251.66 KiB) Viewed 262 times

There is 'Convert into' with which we can convert image into several popular formats. However, this copy is created in the source location, next to the original file. And sometimes this result is undesired. We're making presentation and want to put smaller image. We're sending
XnView MP 'Convert into' context menu function.png
XnView MP 'Convert into' context menu function.png (308.64 KiB) Viewed 262 times

EXAMPLE SITUATION
1) When writing mail to someone with an illustration just to show how something looks, it's enough to display/attach e.g. 800x600 JPG image.

2) Resizing image is possible, when composing mail, e.g. in TB by 'Shrunked Image Resizer' add-on.
https://www.thunderbird.net
https://addons.thunderbird.net/en-US/th ... e-resizer/
https://github.com/memeller/shrunked (v5.10.1, 2025-03-31)
2) XN to TB JPG.mp4
(1.97 MiB) Downloaded 11 times

3) But HEIC does not work
(Works only: JPG, PNG, BMP).
3) XN to TB HEIC image.mp4
(708.1 KiB) Downloaded 10 times
There is also some limitation of file size, so 34.88 MiB 'oil.bmp' did not work. After external resizing it to 800x600 1.37 MiB, image appeared in compose window.
User avatar
user0
XnThusiast
Posts: 2408
Joined: Sat May 09, 2015 9:37 am

Re: Make 'Copy as...' creator to copy image into clipboard with format convert (not the whole file but, as-it-is-display

Post by user0 »

Piotr Osada wrote: Thu May 15, 2025 7:38 pm Similar functionality, I'm describing, is available e.g. in OriginPro.
it only required there to rasterize vector graphic

Piotr Osada wrote: Thu May 15, 2025 7:38 pm It may seem that pointed function is enough covered by simple: crop, copy and paste. But this not works as intended in many apps. E.g.:
MS Word
MS PowerPoint
LibreOffice
It does work (only?) in MS Paint (11.2503.381.0). So it looks like there is some "communication" between apps that is under the hood.
viewtopic.php?p=186316#p186316
Copying part of image is buggy

Piotr Osada wrote: Thu May 15, 2025 7:38 pm There is 'Convert into' with which we can convert image into several popular formats. However, this copy is created in the source location, next to the original file. And sometimes this result is undesired. We're making presentation and want to put smaller image. We're sending
1. open image in Viewer tab
2. press Shift+S to Resize
OR use Batch convert

Piotr Osada wrote: Thu May 15, 2025 7:38 pm 2) Resizing image is possible, when composing mail, e.g. in TB by 'Shrunked Image Resizer' add-on.
you are already in image viewer/editing app
1. press Shift+S and resize image
2. copy/paste
3. close image in XnView w/o saving
Piotr Osada
Posts: 3
Joined: Thu May 15, 2025 3:42 pm

Re: Make 'Copy as...' creator to copy image into clipboard with format convert (not the whole file but, as-it-is-display

Post by Piotr Osada »

Thanks for instructions!
user0 wrote: Fri May 16, 2025 3:29 am
Piotr Osada wrote: Thu May 15, 2025 7:38 pm Convert...
1. open image in Viewer tab
2. press Shift+S to Resize
OR use Batch convert
Here I can see inconsistency:
  • copying full-sized HEIC copies HEIC
  • copying resized file copies to clipboard as PNG
XnView resize HEIC and copy, and paste to Writer, copies actually PNG (LO Writer ODT archive).png
XnView resize HEIC and copy, and paste to Writer, copies actually PNG (LO Writer ODT archive).png (22.42 KiB) Viewed 192 times
In my case, converting at resize is actually desired. But that is also why I proposed such kind of simple dialog to choose or even only a way to inform the user exactly what type of file is in the clipboard.
user0 wrote: Fri May 16, 2025 3:29 am
Piotr Osada wrote: Thu May 15, 2025 7:38 pm Resizing image...
1. press Shift+S and resize image
2. copy/paste
3. close image in XnView w/o saving
Finally, I understand that it may require many of days-months to implement such function.
Not taking into account the effort to implement, in my opinion this feature would be good, and would not make mess, excess/redundancy of UX/UI.

What is your opinion?
Post Reply