diff options
| author | Manolo Gouy <Manolo> | 2018-04-29 11:02:34 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2018-04-29 11:02:34 +0000 |
| commit | 7dba27a404d20485646ea57a526ec79a658ed9cb (patch) | |
| tree | 5345af7d98e27333ae86d1918f7dfa16ade93e3d /src/Fl_win32.cxx | |
| parent | ba4559701f45b06eed6632442b340c98ff8038bb (diff) | |
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
Diffstat (limited to 'src/Fl_win32.cxx')
| -rw-r--r-- | src/Fl_win32.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index d012b57b5..103bd5bc0 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -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 - void *pDIBBits = (void *)(lpBI->bmiColors); + void *pDIBBits = (void *)(lpBI->bmiColors + 256); if (lpBI->bmiHeader.biCompression == BI_BITFIELDS) pDIBBits = (void *)(lpBI->bmiColors + 3); else if (lpBI->bmiHeader.biClrUsed > 0) pDIBBits = (void *)(lpBI->bmiColors + lpBI->bmiHeader.biClrUsed); 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); 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); |
