Hi
Is it possible to crop a HBITMAP directly? I got it working by using GDI+ by converting to bitmap, copy wanted part, then convert back to hbitmp.
#include <GDIPlus.au3> #Include <ScreenCapture.au3> _GDIPlus_Startup () $begin = TimerInit() ; Test, screenshot direct to hbitmap Local $hHBMP = _ScreenCapture_Capture('',0,0,@DesktopWidth,@DesktopHeight,False) ConsoleWrite("Creating _ScreenCapture_Capture hbitmap Desktop screenshot took " & TimerDiff($begin) & " milliseconds"& @LF) $begin = TimerInit() ; Test, Crop from hbitmap Local $hBMP= _GDIPlus_BitmapCreateFromHBITMAP($hHBMP) Local $hBMP_Cropped = _GDIPlus_BitmapCloneArea($hBMP, 0, 0, 110, 110) Local $hHBMP_Cropped = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBMP_Cropped) ;_GDIPlus_ImageSaveToFile($hBMP_Cropped, $BMP3) ConsoleWrite("Creating cropped hbitmap Desktop screenshot took " & TimerDiff($begin) & " milliseconds"& @LF)