[vbox-dev] [PATCH] VirtualBox Additions DIB Patch

François Revol revol at free.fr
Wed Jun 19 08:33:21 GMT 2013


Hello,

On 19/06/2013 03:48, Sergey Staroletov wrote:
> Hi guys,
> 
> We've created patch for common pasteboard for the Additions.

Thanks for working on this, I knew it wasn't fully working when I wrote
the initial code, but it worked for me, and I don't have a Mac anymore
anyway.

> If the host is MacOSX and guest is Windows, the picture from Mac to the
> guest paste buffer comes as BMP with DIB header version 3, and this
> picture puts to buffer also with DIB header version 3. Some
> applications, for example Paint, are able to work with this format, but
> some, for example Wordpad and IBM Lotus Notes - don't and crashes. There
> was no solution for now.
> 
> Despite Windows documentation about formats and its automatic
> conversion, really its work only with DIB header version 1
> (BITMAPINFOHEADER)
> and field biHeight must be positive.
> 
> Therefore we are changing header and coordinate axes orientation and
> flipping the image so that it was not inverted.

Of course best would be to settle on a really standardized (PNG?) format
for interchange instead of a "mostly documented" one, but well...

> 
> We modified VBoxClipboard.cpp. We were used VirtualBox-4.2.12 guests for
> tests.

It's usually best to submit diffs in unified format (diff -u) so that
they contain context lines around for patch to make sure it doesn't
break anything.

Also, your patch has much higher chances of getting in if you diff
against the current svn trunk, in which case "svn diff" will produce the
unified format automatically.

François.




More information about the vbox-dev mailing list