Enforcer Posted November 6, 2009 Share Posted November 6, 2009 (edited) I'm truing to do a small program that will simply slice one big (bmp) image to many small parts (32x32 px) and save each part to its own file... So the question is: whitch functions in autoit can do this, or may help me to do this ? Or maybe some UDF ? =) Or maybe some links to examples ? ============================ Sorry for my bad English... Edited November 6, 2009 by Enforcer [RU] Zone Link to comment Share on other sites More sharing options...
BrettF Posted November 6, 2009 Share Posted November 6, 2009 Check out the GDI+ functions in the helpfile. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Enforcer Posted November 6, 2009 Author Share Posted November 6, 2009 (edited) Ye already Found Thx eny way #include <GDIPlus.au3> #include <ScreenCapture.au3> Opt('MustDeclareVars', 1) XSlice() Func XSlice() Local $hBitmap, $hClone, $hImage, $iX, $iY ; Initialize GDI library _GDIPlus_StartUp () ; Open Bitmap $hImage = _GDIPlus_ImageLoadFromFile (@ScriptDir & "\TEST.bmp") $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap ($hImage) ; Copy Area $iX = _GDIPlus_ImageGetWidth ($hImage) $iY = _GDIPlus_ImageGetHeight ($hImage) $hClone = _GDIPlus_BitmapCloneArea ($hImage, 0, 0, 32, 32, $GDIP_PXF32RGB) ; Save bitmap to file _GDIPlus_ImageSaveToFile ($hClone, @MyDocumentsDir & "\SLICEDIMAGE.bmp") ; Clean up resources _GDIPlus_ImageDispose ($hClone) _GDIPlus_ImageDispose ($hImage) _WinAPI_DeleteObject ($hBitmap) ; Shut down GDI library _GDIPlus_ShutDown () EndFunc Edited November 6, 2009 by Enforcer [RU] Zone Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now