summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2018-04-29 17:25:33 +0000
committerManolo Gouy <Manolo>2018-04-29 17:25:33 +0000
commit6cdfd92247d61a4bc934b05176ae06a84e1c5e5f (patch)
tree245190845e35ce7db92543966d6376a9bd57e309
parent09f15fcac0b030dc0602eabb7d064920aac3538d (diff)
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
-rw-r--r--src/Fl_win32.cxx2
1 files changed, 1 insertions, 1 deletions
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