#include <GDIPlus.au3>
_GDIPlus_Startup()
$hImage = _GDIPlus_ImageLoadFromFile("1.jpg")
$iW = _GDIPlus_ImageGetWidth($hImage)
$iH = _GDIPlus_ImageGetHeight($hImage)
$tBits = _GDIPlus_BitmapLockBits($hImage, 0, 0, $iW, $iH, BitOR($GDIP_ILMWRITE, $GDIP_ILMREAD))
$iScan0 = DllStructGetData($tBits, "Scan0")
$tPixel = DllStructCreate("int[" & $iW * $iH & "];", $iScan0)
For $iY = 0 To $iH - 1
$iOffset = $iY * $iW + 1
For $iX = 0 To $iW - 1
$iColor = DllStructGetData($tPixel, 1, $iOffset + $iX)
$iR = BitAND(BitShift($iColor, 16), 0xFF)
$iG = BitAND(BitShift($iColor, 8), 0xFF)
$iB = BitAND($iColor, 0xFF)
If $iR < 100 And $iG < 100 And $iB > 70 Then DllStructSetData($tPixel, 1, 0xFFFFFF, $iOffset + $iX)
Next
Next
_GDIPlus_BitmapUnlockBits($hImage, $tBits)
_GDIPlus_ImageSaveToFile($hImage, "2.jpg")
_GDIPlus_ImageDispose($hImage)
_GDIPlus_Shutdown()