GNU bug report logs -
#71909
30.0.60; Can not use yank-media for pasting image from clipboad in org-mode on Windows platform
Previous Next
Reported by: Eason Huang <aqua0210 <at> foxmail.com>
Date: Wed, 3 Jul 2024 04:47:01 UTC
Severity: wishlist
Found in version 30.0.60
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #40 received at 71909 <at> debbugs.gnu.org (full text, mbox):
On 06/10/2024 7:59, Eli Zaretskii wrote:
> But BITMAP is not PNG, AFAIU. Moreover, with some images, when I copy
> them in a Web browser, I see "PNG" in the targets vector reported by
> gui-get-selection. So I think we need to understand what exactly we
> get with each format before we decide on the mapping.
The standard bitmap formats for the clipboard (CF_BITMAP, CF_DIB,
CF_DIBV5) are image data specific to windows, not an image format for
saving to file. We need to convert it to an image format, with a
mime/type. PNG or any other, even multiple ones.
GIMP on ubuntu for example does this when you copy a section of image:
[TIMESTAMP TARGETS MULTIPLE SAVE_TARGETS image/png image/bmp image/x-bmp
image/x-MS-bmp image/x-icon image/x-ico image/x-win-bitmap
image/vnd.microsoft.icon ...]
On windows it does this:
[PNG DIB BITMAP DIBV5]
And the Paint program that comes with Windows 11:
[DataObject Embed\ Source Native OwnerLink Object\ Descriptor METAFILE
DIB PNG image/png Ole\ Private\ Data ENHMETAFILE BITMAP ...]
I didn't expect the PNG, image/png formats. I suppose they are the same
image as the DIB/BITMAP. It seems programs are already doing the
conversion. I don't know the details yet, I'm on it.
So at least for images it seems most times we will have a well-known
format. If not (BITMAP,DIV), then we can do the PNG conversion.
> As another data point. text/html seems to be Firefox-specific thing;
> the standard Windows name for this is "HTML Format" (with the embedded
> space).
It may be interesting to handle some of this specific formats, from
Firefox, or OpenOffice as discussed on another thread. We will have to
detect them somehow and decide what to do for each case.
> I don't like the Gnome-specific name x-special/gnome-copied-files.
> I'd rather we produced a more generic name, and then ask the Org
> developers to add support for it.
Of course.
> What about other kinds of media, like audio and video data? Is that
> supported, and if so, can we include that in some way?
In standard formats there is CF_RIFF and CF_WAVE. Also programas may
insert a file format (as they do with PNGS), but I haven't found any
example yet. In any case, we can do the same as with images.
This bug report was last modified 260 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.