You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experiencing an issue with copying an image (or bitmap with alpha) to the clipboard and then pasting it into PowerPoint (and other MS Office apps).
The issue can be seen in the wxImage sample (imagesample.exe):
Choose Clipboard->Copy Image as wxImage
Open PowerPoint and paste -> nothing happens (I tried paste special too). The behaviour seems independent of whether the copied image has an alpha channel.
Pasting DOES work in the Image sample Clipboard->Paste image as wxImage, and also in the Paint.net editor I have installed. If I subsequently choose Edit->Copy in Paint.net, I can paste the image directly into PowerPoint.
Choosing Copy test image as wxBitmap in imagesample.exe can then be pasted into PowerPoint when there is no alpha channel (i.e. the sample's test image). If the bitmap has an alpha channel, however, alpha seems to be lost when pasting into PowerPoint (shown by black background and pure black pixels where there was partial transparency in the wxBitmap.
Expected vs observed behaviour:
Although it is possible to paste the image into e.g. Paint.net, and from there into PowerPoint, it sure would be nice to be able to paste directly from my wx app into PowerPoint (as that is used by many users for presenting results).
Platform and version information
wxWidgets version you use: 3.2.4 master at commit 91de986 (28 Jan 2024)
wxWidgets port: wxMSW
OS and its version: Windows 11 Version 10.0.22631 Build 22631
The text was updated successfully, but these errors were encountered:
I can reproduce issue when using "Copy image as wxImage" with GIT master using Microsoft 365 MSO Version 2403 and others on Windows 10. Some programs can paste (Word, LibreOffice Write, GIMP), some cannot (Excel, PowerPoint, Paint, IrfanView).
NirSoft InsideClipboard reports the clipboard format used as PNG regardless of the test image file format. I did not have time to look into this any further.
This is weird because copying an image from Excel itself puts it on clipboard in several formats including PNG (also JFIF and GIF for some reason, as well as CF_BITMAP), but when we put it on clipboard in this format it indeed doesn't want to paste it.
We probably should make the data available in CF_BITMAP (or CF_DIB? or both?) formats too, it shouldn't be really difficult to do.
For now please use wxBitmapDataObject as workaround.
Bug description:
I'm experiencing an issue with copying an image (or bitmap with alpha) to the clipboard and then pasting it into PowerPoint (and other MS Office apps).
The issue can be seen in the wxImage sample (imagesample.exe):
Pasting DOES work in the Image sample Clipboard->Paste image as wxImage, and also in the Paint.net editor I have installed. If I subsequently choose Edit->Copy in Paint.net, I can paste the image directly into PowerPoint.
Choosing Copy test image as wxBitmap in imagesample.exe can then be pasted into PowerPoint when there is no alpha channel (i.e. the sample's test image). If the bitmap has an alpha channel, however, alpha seems to be lost when pasting into PowerPoint (shown by black background and pure black pixels where there was partial transparency in the wxBitmap.
Expected vs observed behaviour:
Although it is possible to paste the image into e.g. Paint.net, and from there into PowerPoint, it sure would be nice to be able to paste directly from my wx app into PowerPoint (as that is used by many users for presenting results).
Platform and version information
The text was updated successfully, but these errors were encountered: