Web Export - Export to Clipboard on Windows does not play well with MS Office

Hier diskutieren die Betatester von PhotoLine untereinander und mit den Entwicklern
Antworten
Benutzeravatar
ono
Mitglied
Beiträge: 148
Registriert: Mi 21 Jul 2010 23:50
Wohnort: Baden, Switzerland
Kontaktdaten:

Web Export - Export to Clipboard on Windows does not play well with MS Office

Beitrag von ono »

I use PL to annotate screenshots a lot then I want to paste such a screenshot usually as a PNG into Outlook's email. The problem is that if I copy the layer directly I often get "Picture can't be displayed" (see below).
PictureCannotBeDisplayed.png
PictureCannotBeDisplayed.png (3.29 KiB) 1631 mal betrachtet
If I do Web Export > Export to Clipboard, PL uses CFSTR_FILECONTENTS or CFSTR_FILEDESCRIPTOR (I believe) that effectively when doing Ctrl+V creates a file attachment in Outlook instead of pasting the image directly into the text.
Outlook.png
Outlook.png (4.99 KiB) 1631 mal betrachtet
So my proposition is as follows, would it be hard to add add an option to File > Save Options > [X] Export to Clipboard as File (enabled by default) then Web Export > Export to Clipboard has current behavior, but if I disable it, then instead it uses RegisterClipboardFormat with "PNG", "JPEG", or whatever else is selected as format, instead of CFSTR_FILECONTENTS. This should make MS Office treat the clipboard contents as an image not a file.

Alternatively can you guys have a look why often copying regular image layer from PL produces this damn "Picture can't be displayed" in MS Office, such as Powerpoint?

Thanks.
Adam Strzelecki | nanoant.com | CBCT/PET tomography engineer
Martin Huber
Entwickler
Entwickler
Beiträge: 4159
Registriert: Di 19 Nov 2002 15:49

Re: Web Export - Export to Clipboard on Windows does not play well with MS Office

Beitrag von Martin Huber »

ono hat geschrieben: Mi 08 Apr 2020 19:17 I use PL to annotate screenshots a lot then I want to paste such a screenshot usually as a PNG into Outlook's email. The problem is that if I copy the layer directly I often get "Picture can't be displayed" (see below).
If you copy the same layer a second time, you get the same result? How do you copy ("Edit > Copy", "Edit > Merged Copy")? What is the active tool?
Do you use a clipboard manager or the Win10 cloud clipboard or Win10 clipboard history (I don't know its exact name, because I am using a German Windows)?

If you can reproduce the problem, could you send us the file along with instructions (active layer, active tool, copy command)?

Martin
Benutzeravatar
ono
Mitglied
Beiträge: 148
Registriert: Mi 21 Jul 2010 23:50
Wohnort: Baden, Switzerland
Kontaktdaten:

Re: Web Export - Export to Clipboard on Windows does not play well with MS Office

Beitrag von ono »

Martin Huber hat geschrieben: Do 09 Apr 2020 17:52 (...) If you copy the same layer a second time, you get the same result? How do you copy ("Edit > Copy", "Edit > Merged Copy")? What is the active tool?
I think I understand the problem. Using NirSoft's InsideClipboard it looks PhotoLine (22.40b3) is adding image/svg+xml into the clipboard and latest MS Office that has SVG support tries to consume it. Every time I get broken image when pasting to Powerpoint or Outlook I can see random garbage in image/svg+xml Format in my clipboard following closing </svg>. When the image is OK, then there is no garbage after </svg>, so I tend to believe there's a bug in PhotoLine that adds randomly some garbage to SVG buffer, see image below:
PL2240b3_Clipboard.png
PL2240b3_Clipboard.png (44.22 KiB) 1568 mal betrachtet

P.S. Also I think it would be nice if we could control if we want to put all these PDF, SVG, TIFF, PNG, JPEG into clipboard, so some dedicated Options page to control that would be great. I guess simple list of checkboxes would be enough, so I could leave on PNG on for example.
Adam Strzelecki | nanoant.com | CBCT/PET tomography engineer
Martin Huber
Entwickler
Entwickler
Beiträge: 4159
Registriert: Di 19 Nov 2002 15:49

Re: Web Export - Export to Clipboard on Windows does not play well with MS Office

Beitrag von Martin Huber »

ono hat geschrieben: Sa 11 Apr 2020 19:15 I think I understand the problem. Using NirSoft's InsideClipboard it looks PhotoLine (22.40b3) is adding image/svg+xml into the clipboard and latest MS Office that has SVG support tries to consume it. Every time I get broken image when pasting to Powerpoint or Outlook I can see random garbage in image/svg+xml Format in my clipboard following closing </svg>. When the image is OK, then there is no garbage after </svg>, so I tend to believe there's a bug in PhotoLine that adds randomly some garbage to SVG buffer, see image below:
That's intersting. Most sizes are a multiple of 4096. I will check that.
ono hat geschrieben: Sa 11 Apr 2020 19:15P.S. Also I think it would be nice if we could control if we want to put all these PDF, SVG, TIFF, PNG, JPEG into clipboard, so some dedicated Options page to control that would be great. I guess simple list of checkboxes would be enough, so I could leave on PNG on for example.
I am not a fan of too many options. It is a very common problem that people change an option they don't fully understand and wonder later why PhotoLine changed its behavior. And too many options hide the important ones.

In this special case it is very hard for most users to know what kind of clipboard data their application supports best. However, it is questionable whether copying a simple image needs PDF or SVG.

Martin
Benutzeravatar
ono
Mitglied
Beiträge: 148
Registriert: Mi 21 Jul 2010 23:50
Wohnort: Baden, Switzerland
Kontaktdaten:

Re: Web Export - Export to Clipboard on Windows does not play well with MS Office

Beitrag von ono »

I can confirm that Paste to Office apps now works well with PL 22.40b5, and also that SVG is no longer added to the clipboard, so I assume the problem is now resolved. Thank you.
PL2240b5_Clipboard.png
PL2240b5_Clipboard.png (13.27 KiB) 1439 mal betrachtet
Adam Strzelecki | nanoant.com | CBCT/PET tomography engineer
Antworten