Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Image DnD into Upp app
Re: Image DnD into Upp app [message #44202 is a reply to message #44199] |
Fri, 23 January 2015 09:43 |
|
mirek
Messages: 13980 Registered: November 2005
|
Ultimate Member |
|
|
bushman wrote on Thu, 22 January 2015 21:18Hello, Mirek,
Splendid! Almost there...
...works great in Win7 now, but still does not drop jpg from MS Word into UWord in Win8.1. Test output creates a blank data.bin and this fmt LOG:
* C:\upp\out\examples\MSC9.Debug.Debug_Full.Gui.Mt\UWord.exe 22.01.2015 17:05:00, user: admin
fmt = dib
DnD jpg from File Explorer into UWord works perfectly in both OS versions.
Any hint on what to try next?
Many thanks!!!
Well, looks like problem with dib... Some more logs:
Image GetImage(PasteClip& clip)
{
GuiLock __;
Image m;
if(Accept<Image>(clip)) {
LoadFromString(m, ~clip);
if(!m.IsEmpty())
return m;
}
if(clip.Accept("dib")) {
LOG("DIB accepted");
String data = ~clip;
if((unsigned)data.GetCount() < sizeof(BITMAPINFO)) return Null;
LOG("DIB accepted 2");
BITMAPINFO *lpBI = (BITMAPINFO *)~data;
BITMAPINFOHEADER& hdr = lpBI->bmiHeader;
byte *bits = (byte *)lpBI + hdr.biSize;
if(hdr.biBitCount <= 8)
bits += (hdr.biClrUsed ? hdr.biClrUsed : 1 << hdr.biBitCount) * sizeof(RGBQUAD);
if(hdr.biBitCount >= 16 || hdr.biBitCount == 32) {
if(hdr.biCompression == 3)
bits += 12;
if(hdr.biClrUsed != 0)
bits += hdr.biClrUsed * sizeof(RGBQUAD);
}
DUMP(bits);
DUMP((int)hdr.biHeight);
DUMP((int)hdr.biWidth);
int h = abs((int)hdr.biHeight);
ImageDraw iw(hdr.biWidth, h);
::StretchDIBits(iw.GetHandle(),
0, 0, hdr.biWidth, h,
0, 0, hdr.biWidth, h,
bits, lpBI, DIB_RGB_COLORS, SRCCOPY);
return iw;
}
return Null;
}
Thanks!
Mirek
|
|
|
|
|
Image DnD into Upp app
By: bushman on Wed, 14 January 2015 15:28
|
|
|
Re: Image DnD into Upp app
By: mirek on Wed, 14 January 2015 19:21
|
|
|
Re: Image DnD into Upp app
By: bushman on Wed, 14 January 2015 22:09
|
|
|
Re: Image DnD into Upp app
By: mirek on Thu, 15 January 2015 08:51
|
|
|
Re: Image DnD into Upp app
By: bushman on Thu, 15 January 2015 19:06
|
|
|
Re: Image DnD into Upp app
By: mirek on Thu, 15 January 2015 20:58
|
|
|
Re: Image DnD into Upp app
By: mirek on Thu, 15 January 2015 21:11
|
|
|
Re: Image DnD into Upp app
By: bushman on Thu, 15 January 2015 23:26
|
|
|
Re: Image DnD into Upp app
By: mirek on Fri, 16 January 2015 09:16
|
|
|
Re: Image DnD into Upp app
By: bushman on Fri, 16 January 2015 21:41
|
|
|
Re: Image DnD into Upp app
By: mirek on Sat, 17 January 2015 16:19
|
|
|
Re: Image DnD into Upp app
By: bushman on Sat, 17 January 2015 18:10
|
|
|
Re: Image DnD into Upp app
By: mirek on Sun, 18 January 2015 09:18
|
|
|
Re: Image DnD into Upp app
By: bushman on Sun, 18 January 2015 11:44
|
|
|
Re: Image DnD into Upp app
By: koldo on Thu, 15 January 2015 08:51
|
|
|
Re: Image DnD into Upp app
By: bushman on Thu, 15 January 2015 19:17
|
|
|
Re: Image DnD into Upp app
By: bushman on Sun, 18 January 2015 11:56
|
|
|
Re: Image DnD into Upp app
By: mirek on Mon, 19 January 2015 11:41
|
|
|
Re: Image DnD into Upp app
By: bushman on Mon, 19 January 2015 19:59
|
|
|
Re: Image DnD into Upp app
By: mirek on Tue, 20 January 2015 14:44
|
|
|
Re: Image DnD into Upp app
By: bushman on Thu, 22 January 2015 21:18
|
|
|
Re: Image DnD into Upp app
By: mirek on Fri, 23 January 2015 09:43
|
|
|
Re: Image DnD into Upp app
|
|
|
Re: Image DnD into Upp app
By: bushman on Fri, 23 January 2015 22:14
|
|
|
Re: Image DnD into Upp app
By: mirek on Sat, 24 January 2015 11:49
|
|
|
Re: Image DnD into Upp app
By: bushman on Sat, 24 January 2015 15:21
|
|
|
Re: Image DnD into Upp app
By: mirek on Mon, 26 January 2015 19:05
|
|
|
Re: Image DnD into Upp app
By: bushman on Mon, 26 January 2015 21:24
|
Goto Forum:
Current Time: Thu May 16 10:20:53 CEST 2024
Total time taken to generate the page: 0.01633 seconds
|