0,0 → 1,26 |
|
#constant DLL_DBProImageDebug 1 |
#constant FN_DLL_DBProImageDebug "DBProImageDebug.dll" |
|
function resizeImage(image as dword, width as dword, height as dword) |
rem https://forum.thegamecreators.com/thread/191558#msg2284289 , modified |
rem ATTENTION! Will crash when you try to increase the size (resize small picture into large picture)! |
|
if DLL EXIST(DLL_DBProImageDebug) = 0 |
load dll FN_DLL_DBProImageDebug, DLL_DBProImageDebug |
ENDIF |
|
call dll DLL_DBProImageDebug, "?Stretch@@YAXHHH@Z", image, width, height // This function won't reset the size |
pWidth = make memory(4) |
pHeight = make memory(4) |
pDepth = make memory(4) |
ppData = make memory(4) |
pSize = make memory(4) |
call dll DLL_DBProImageDebug, "?GetImageData@@YAXHPAK00PAPAD0_N@Z", image, pWidth, pHeight, pDepth, ppData, pSize, 1 |
call dll DLL_DBProImageDebug, "?SetImageData@@YAXHKKKPADK@Z", image, width, height, *pDepth, *ppData, *pSize |
delete memory pWidth |
delete memory pHeight |
delete memory pDepth |
delete memory ppData |
delete memory pSize |
endfunction |