#include <GDIPlus.au3>
#include <GDIP.au3>
_GDIPlus_Startup()
$hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\bmp32.bmp")
$iWidth = _GDIPlus_ImageGetWidth($hImage)
$iHeight = _GDIPlus_ImageGetHeight($hImage)
$tBitmapData = _GDIPlus_BitmapLockBits($hImage, 0, 0, $iWidth, $iHeight, $GDIP_ILMREAD, $GDIP_PXF24RGB)
$iStride = DllStructGetData($tBitmapData, "Stride")
$iScan0 = DllStructGetData($tBitmapData, "Scan0")
$hBitmap = _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight, $iStride, $GDIP_PXF24RGB, $iScan0)
_GDIPlus_ImageSaveToFile($hBitmap, @ScriptDir & "\bmp24.bmp")
_GDIPlus_BitmapUnlockBits($hImage, $tBitmapData)
_GDIPlus_Shutdown()
|