mirror of
https://github.com/fltk/fltk.git
synced 2026-05-28 11:25:22 +08:00
Fix Fl_WinAPI_System_Driver::paste() when clipboard contains GIF image
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12878 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+1
-3
@@ -822,14 +822,12 @@ void Fl_WinAPI_System_Driver::paste(Fl_Widget &receiver, int clipboard, const ch
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else { // the system will decode a complex DIB
|
} else { // the system will decode a complex DIB
|
||||||
void *pDIBBits = (void *)(lpBI->bmiColors);
|
void *pDIBBits = (void *)(lpBI->bmiColors + 256);
|
||||||
if (lpBI->bmiHeader.biCompression == BI_BITFIELDS)
|
if (lpBI->bmiHeader.biCompression == BI_BITFIELDS)
|
||||||
pDIBBits = (void *)(lpBI->bmiColors + 3);
|
pDIBBits = (void *)(lpBI->bmiColors + 3);
|
||||||
else if (lpBI->bmiHeader.biClrUsed > 0)
|
else if (lpBI->bmiHeader.biClrUsed > 0)
|
||||||
pDIBBits = (void *)(lpBI->bmiColors + lpBI->bmiHeader.biClrUsed);
|
pDIBBits = (void *)(lpBI->bmiColors + lpBI->bmiHeader.biClrUsed);
|
||||||
Fl_Image_Surface *surf = new Fl_Image_Surface(width, height);
|
Fl_Image_Surface *surf = new Fl_Image_Surface(width, height);
|
||||||
//fprintf(LOG,"complex DIB surf=%p biCompression=%d BI_BITFIELDS=%d biClrUsed=%d\n",
|
|
||||||
// surf,lpBI->bmiHeader.biCompression,BI_BITFIELDS,lpBI->bmiHeader.biClrUsed);fflush(LOG);
|
|
||||||
Fl_Surface_Device::push_current(surf);
|
Fl_Surface_Device::push_current(surf);
|
||||||
SetDIBitsToDevice((HDC)fl_graphics_driver->gc(), 0, 0, width, height, 0, 0, 0, height, pDIBBits, lpBI, DIB_RGB_COLORS);
|
SetDIBitsToDevice((HDC)fl_graphics_driver->gc(), 0, 0, width, height, 0, 0, 0, height, pDIBBits, lpBI, DIB_RGB_COLORS);
|
||||||
rgb = fl_read_image(NULL, 0, 0, width, height);
|
rgb = fl_read_image(NULL, 0, 0, width, height);
|
||||||
|
|||||||
Reference in New Issue
Block a user