dinodod Posted May 29, 2007 Posted May 29, 2007 I'm trying to make a project where I have several large images that I need to slice up into smaller pieces. I am looking around but I am not seeing anything in autoit that can handle slicing images. I've seen a post towards resizing an image but can this also be done in Autoit? I need both functions if possible, preferable the 1st, image slicer. Thanks! Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007
PaulIA Posted May 29, 2007 Posted May 29, 2007 I'm trying to make a project where I have several large images that I need to slice up into smaller pieces. I am looking around but I am not seeing anything in autoit that can handle slicing images. I've seen a post towards resizing an image but can this also be done in Autoit? I need both functions if possible, preferable the 1st, image slicer. Thanks!Using Auto3Lib: #include <A3LGDIPlus.au3> #include <A3LScreenCap.au3> Global $hBitmap, $hImage, $aSlice[4], $iSliceX, $iSliceY, $iI ; Capture screen $hBitmap = _ScreenCap_Capture("") ; Initialize GDI+ library _GDIP_Startup() ; Slice up into 4 parts $hImage = _GDIP_BitmapCreateFromHBITMAP($hBitmap) $iSliceX = @DesktopWidth / 2 $iSliceY = @DesktopHeight / 2 $aSlice[0] = _GDIP_BitmapCloneArea($hImage, 0 , 0 , $iSliceX, $iSliceY, $GDIP_PXF24RGB) $aSlice[1] = _GDIP_BitmapCloneArea($hImage, $iSliceX, 0 , $iSliceX, $iSliceY, $GDIP_PXF24RGB) $aSlice[2] = _GDIP_BitmapCloneArea($hImage, 0 , $iSliceY, $iSliceX, $iSliceY, $GDIP_PXF24RGB) $aSlice[3] = _GDIP_BitmapCloneArea($hImage, $iSliceX, $iSliceY, $iSliceX, $iSliceY, $GDIP_PXF24RGB) ; Save slices for $iI = 0 to 3 _GDIP_ImageSaveToFile($aSlice[$iI], "C:\A3LSlice" & $iI & ".bmp") _API_DeleteObject($aSlice[$iI]) next ; Clean up resources _GDIP_ImageDispose($hImage ) _API_DeleteObject ($hBitmap) _GDIP_ShutDown() Auto3Lib: A library of over 1200 functions for AutoIt
PaulIA Posted June 12, 2007 Posted June 12, 2007 is it possible to resize with anti-aliasing?GDI+ has transformation (resizing) and anti aliasing functions, but I haven't got them built into Auto3Lib at the moment. Auto3Lib: A library of over 1200 functions for AutoIt
CoDEmanX Posted September 9, 2007 Posted September 9, 2007 when will it be available?btw: http://www.codeproject.com/cs/media/AntiAliasingIssues.asp (looks great, but its for .net)
Zedna Posted September 9, 2007 Posted September 9, 2007 (edited) when will it be available?btw: http://www.codeproject.com/cs/media/AntiAliasingIssues.asp (looks great, but its for .net)PaulIA is author of Auto3Library but he has left it's development. Edited September 9, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
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