summaryrefslogtreecommitdiff
path: root/plugins/Utils.pas
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-07 23:38:31 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-07 23:38:31 +0300
commit777dc2174f34c2a4d4499c3d63ef8914ed9ecb81 (patch)
tree6d7c6c4b09287386739ba4cc7accde38ed90da8c /plugins/Utils.pas
parente9e0d8203c36c1d2e2aa4201e01bf4206804f25b (diff)
old AdvaImg services converted into Image_* functions
Diffstat (limited to 'plugins/Utils.pas')
-rw-r--r--plugins/Utils.pas/mirutils.pas12
1 files changed, 2 insertions, 10 deletions
diff --git a/plugins/Utils.pas/mirutils.pas b/plugins/Utils.pas/mirutils.pas
index f6ffad2c6a..47f28ea776 100644
--- a/plugins/Utils.pas/mirutils.pas
+++ b/plugins/Utils.pas/mirutils.pas
@@ -590,7 +590,6 @@ var
req :TNETLIBHTTPREQUEST;
resp:PNETLIBHTTPREQUEST;
hNetLib:THANDLE;
- im:TIMGSRVC_MEMIO;
begin
result:=0;
if (url=nil) or (url^=#0) then
@@ -611,15 +610,8 @@ begin
if resp<>nil then
begin
if resp^.resultCode=200 then
- begin
- im.iLen :=resp.dataLength;
- im.pBuf :=resp.pData;
- im.flags:=size shl 16;
- im.fif :=FIF_JPEG;
- result :=CallService(MS_IMG_LOADFROMMEM,wparam(@im),0);
-// if result<>0 then
-// DeleteObject(SendMessage(wnd,STM_SETIMAGE,IMAGE_BITMAP,result)); //!!
- end;
+ result := Image_LoadFromMem(resp.pData, resp.dataLength, FIF_JPEG);
+
Netlib_FreeHttpRequest(resp);
end;
Netlib_CloseHandle(hNetLib);