###User Defined Function###
_GDIPlus_BitmapLockBits

###Description###
Locks a portion of a bitmap for reading or writing

###Syntax###
#include <GDIPlus.au3>
_GDIPlus_BitmapLockBits ( $hBitmap, $iLeft, $iTop, $iWidth, $iHeight [, $iFlags = $GDIP_ILMREAD [, $iFormat = $GDIP_PXF32RGB]] )


###Parameters###
@@ParamTable@@
$hBitmap
	Handle to a bitmap object
$iLeft
	X coordinate of the upper-left corner of the rectangle to lock
$iTop
	Y coordinate of the upper-left corner of the rectangle to lock
$iWidth
	The width of the rectangle to lock
$iHeight
	The height of the rectangle to lock
$iFlags
	[optional] Set of flags that specify whether the locked portion of the bitmap is available for reading or
	for writing and whether the caller has already allocated a buffer. Can be a combination of the following:
		$GDIP_ILMREAD - A portion of the image is locked for reading
		$GDIP_ILMWRITE - A portion of the image is locked for writing
		$GDIP_ILMUSERINPUTBUF - The buffer is allocated by the user
$iFormat
	[optional] Specifies the format of the pixel data in the temporary buffer. Can be one of the following:
		$GDIP_PXF01INDEXED - 1 bpp, indexed
		$GDIP_PXF04INDEXED - 4 bpp, indexed
		$GDIP_PXF08INDEXED - 8 bpp, indexed
		$GDIP_PXF16GRAYSCALE - 16 bpp, grayscale
		$GDIP_PXF16RGB555 - 16 bpp; 5 bits for each RGB
		$GDIP_PXF16RGB565 - 16 bpp; 5 bits red, 6 bits green, and 5 bits blue
		$GDIP_PXF16ARGB1555 - 16 bpp; 1 bit for alpha and 5 bits for each RGB component
		$GDIP_PXF24RGB - 24 bpp; 8 bits for each RGB
		$GDIP_PXF32RGB - 32 bpp; 8 bits for each RGB. No alpha.
		$GDIP_PXF32ARGB - 32 bpp; 8 bits for each RGB and alpha
		$GDIP_PXF32PARGB - 32 bpp; 8 bits for each RGB and alpha, pre-multiplied
@@End@@

###ReturnValue###
@@ReturnTable@@
Success:	a $tagGDIPBITMAPDATA structure.
Failure:	sets the @error flag to non-zero.
@@End@@


###Remarks###
When you are done with the locked portion, call <a href="_GDIPlus_BitmapUnlockBits.htm">_GDIPlus_BitmapUnlockBits()</a> to release the locked region


###Related###
_WinAPI_DeleteObject, _GDIPlus_ImageGetPixelFormat


###See Also###
@@MsdnLink@@ GdipBitmapLockBits


###Example###
@@IncludeExample@@
