all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Cecilio Pardo <cpardo@imayhem.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 71909@debbugs.gnu.org
Subject: bug#71909: 30.0.60;
Date: Mon, 7 Oct 2024 12:24:01 +0200	[thread overview]
Message-ID: <b292da0e-0c33-4f86-b880-6207712d53df@imayhem.com> (raw)
In-Reply-To: <86o73xvkj8.fsf@gnu.org>

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.












  parent reply	other threads:[~2024-10-07 10:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <865xtnhyn6.fsf@foxmail.com>
2024-10-05 12:28 ` bug#71909: 30.0.60; Cecilio Pardo
2024-10-05 12:33   ` Eli Zaretskii
2024-10-05 12:42     ` Eli Zaretskii
2024-10-05 17:14       ` Cecilio Pardo
2024-10-05 19:31         ` Eli Zaretskii
2024-10-05 21:24           ` Cecilio Pardo
2024-10-06  5:59             ` Eli Zaretskii
     [not found]               ` <87ldz1h5s4.fsf@gmail.com>
2024-10-06 11:50                 ` Eli Zaretskii
2024-10-06 12:15                   ` Visuwesh
2024-10-07 10:24               ` Cecilio Pardo [this message]
2024-10-07 11:58                 ` Eli Zaretskii
2024-10-09 12:52                   ` Cecilio Pardo
2024-10-09 13:40                     ` Eli Zaretskii
2024-10-10 10:04     ` Cecilio Pardo
2024-10-10 10:49       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b292da0e-0c33-4f86-b880-6207712d53df@imayhem.com \
    --to=cpardo@imayhem.com \
    --cc=71909@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.