图像缩放模块含调用方法

易语言 2020-02-28 20:38:46

图像缩放模块含调用方法

GdiplusStartup (token, 1, 0)
nSize = 取字节集长度 (Image)
hMem = GlobalAlloc (#GMEM_MOVEABLE, nSize)
lpStr = GlobalLock (hMem)
CreateStreamOnHGlobal (hMem, 假, ipStr)
RtlMoveMemory (lpStr, Image, nSize)
GlobalUnlock (hMem)
GdipLoadImageFromStream (ipStr, bitmap)
GlobalFree (hMem)
GdipGetImageThumbnail (bitmap, Width, Height, bpStr, 0, 0)
GdipDisposeImage (bitmap)
hMem = GlobalAlloc (位或 (#GMEM_ZEROINIT, #GMEM_MOVEABLE), 0)
CreateStreamOnHGlobal (hMem, 假, ipStr)
xpStr = 取空白字节集 (16)
CLSIDFromString ({ 123, 0, 53, 0, 53, 0, 55, 0, 67, 0, 70, 0, 52, 0, 48, 0, 54, 0, 45, 0, 49, 0, 65, 0, 48, 0, 52, 0, 45, 0, 49, 0, 49, 0, 68, 0, 51, 0, 45, 0, 57, 0, 65, 0, 55, 0, 51, 0, 45, 0, 48, 0, 48, 0, 48, 0, 48, 0, 70, 0, 56, 0, 49, 0, 69, 0, 70, 0, 51, 0, 50, 0, 69, 0, 125, 0, 0, 0 }, xpStr)
GdipSaveImageToStream (bpStr, ipStr, xpStr, 0)