From 6cdfd92247d61a4bc934b05176ae06a84e1c5e5f Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Sun, 29 Apr 2018 17:25:33 +0000 Subject: Pasting image from clipboard: partial support of top-down DIB image (still needs completion) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12881 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_win32.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 103bd5bc0..2d8cbb2ab 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -796,7 +796,7 @@ void Fl_WinAPI_System_Driver::paste(Fl_Widget &receiver, int clipboard, const ch if ((h = GetClipboardData(CF_DIB))) { // if there's a DIB in clipboard LPBITMAPINFO lpBI = (LPBITMAPINFO)GlobalLock(h); width = lpBI->bmiHeader.biWidth; // bitmap width & height - height = lpBI->bmiHeader.biHeight; + height = abs(lpBI->bmiHeader.biHeight); if ((lpBI->bmiHeader.biBitCount == 24 || lpBI->bmiHeader.biBitCount == 32) && lpBI->bmiHeader.biCompression == BI_RGB && lpBI->bmiHeader.biClrUsed == 0) { // direct use of the DIB data if it's RGB or RGBA -- cgit v1.2.3