Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | daniel-mar | 1 | |
2 | #constant DLL_Resize 12 |
||
3 | #constant MEM_ResizeSrc 13 |
||
4 | #constant MEM_ResizeDest 14 |
||
5 | |||
6 | #constant DLL_FN_Resize "Resize32.dll" |
||
7 | |||
8 | |||
9 | function resizeImage(image as dword, width as dword, height as dword) |
||
10 | if DLL EXIST(DLL_Resize) = 0 |
||
11 | load dll DLL_FN_Resize, DLL_Resize |
||
12 | endif |
||
13 | |||
14 | make memblock from image MEM_ResizeSrc, image |
||
15 | size = call dll(DLL_Resize, "DestSize", get memblock ptr(MEM_ResizeSrc), width, height) |
||
16 | |||
17 | make memblock MEM_ResizeDest, size |
||
18 | |||
19 | call dll DLL_Resize, "Resize", get memblock ptr(MEM_ResizeSrc), get memblock ptr(MEM_ResizeDest), width, height |
||
20 | |||
21 | |||
22 | make image from memblock image, MEM_ResizeDest |
||
23 | |||
24 | delete memblock MEM_ResizeSrc |
||
25 | delete memblock MEM_ResizeDest |
||
26 | |||
27 | REM delete dll DLL_Resize |
||
28 | endfunction |