myspacee Posted August 24, 2009 Share Posted August 24, 2009 hello to all, is possible to open given image, rotate 180, and flip orizzontally, using only Autoit ? thank you for any info, m. Link to comment Share on other sites More sharing options...
wolf9228 Posted August 24, 2009 Share Posted August 24, 2009 hello to all, is possible to open given image, rotate 180, and flip orizzontally, using only Autoit ? thank you for any info, m. http://msdn.microsoft.com/en-us/library/ms534041%28VS.85%29.aspx http://msdn.microsoft.com/en-us/library/ms535401%28VS.85%29.aspx #include <GDIPlus.au3> Global enum _ $RotateNoneFlipNone = 0 , _ $Rotate90FlipNone = 1 , _ $Rotate180FlipNone = 2 , _ $Rotate270FlipNone = 3 , _ $RotateNoneFlipX = 4 , _ $Rotate90FlipX = 5 , _ $Rotate180FlipX = 6 , _ $Rotate270FlipX = 7 , _ $RotateNoneFlipY = 6 , _ $Rotate90FlipY = 7 , _ $Rotate180FlipY = 4 , _ $Rotate270FlipY = 5 , _ $RotateNoneFlipXY = 6 , _ $Rotate90FlipXY = 7 , _ $Rotate180FlipXY = 0 , _ $Rotate270FlipXY = 1 _GDIPlus_Startup () $hImage = _GDIPlus_ImageLoadFromFile (@MyDocumentsDir & "\GDIPlus_Image.jpg") DllCall($ghGDIPDll,"int","GdipImageRotateFlip","hwnd",$hImage,"long",$Rotate90FlipNone) _GDIPlus_ImageSaveToFile ($hImage, @MyDocumentsDir & "\GDIPlus_Image.jpg") _WinAPI_DeleteObject ($hImage) _GDIPlus_ShutDown () صرح السماء كان هنا Link to comment Share on other sites More sharing options...
smashly Posted August 24, 2009 Share Posted August 24, 2009 (edited) http://msdn.microsoft.com/en-us/library/ms534041%28VS.85%29.aspx http://msdn.microsoft.com/en-us/library/ms535401%28VS.85%29.aspx #include <GDIPlus.au3> Global enum _ $RotateNoneFlipNone = 0 , _ $Rotate90FlipNone = 1 , _ $Rotate180FlipNone = 2 , _ $Rotate270FlipNone = 3 , _ $RotateNoneFlipX = 4 , _ $Rotate90FlipX = 5 , _ $Rotate180FlipX = 6 , _ $Rotate270FlipX = 7 , _ $RotateNoneFlipY = 6 , _ $Rotate90FlipY = 7 , _ $Rotate180FlipY = 4 , _ $Rotate270FlipY = 5 , _ $RotateNoneFlipXY = 6 , _ $Rotate90FlipXY = 7 , _ $Rotate180FlipXY = 0 , _ $Rotate270FlipXY = 1 _GDIPlus_Startup () $hImage = _GDIPlus_ImageLoadFromFile (@MyDocumentsDir & "\GDIPlus_Image.jpg") DllCall($ghGDIPDll,"int","GdipImageRotateFlip","hwnd",$hImage,"long",$Rotate90FlipNone) _GDIPlus_ImageSaveToFile ($hImage, @MyDocumentsDir & "\GDIPlus_Image.jpg") _WinAPI_DeleteObject ($hImage) _GDIPlus_ShutDown () Hi Nice example >_< I'd always flipped an image by initiating a param and passing the param to _GDIPlus_ImageSaveToFileEx() as in the Help file shows under the _GDIPlus_ParamInit() example. But I like your method better as it's easier to follow... good job , neato You should write that "GdipImageRotateFlip" into function format and submit it for GDIPlus.au3 UDF Cheers Edited August 24, 2009 by smashly Link to comment Share on other sites More sharing options...
Yashied Posted August 24, 2009 Share Posted August 24, 2009 (edited) Alternatively. Powerful ProgAndy`s FreeImage UDF library.http://www.autoitscript.com/forum/index.php?showtopic=95357 Edited August 24, 2009 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
wolf9228 Posted August 25, 2009 Share Posted August 25, 2009 (edited) Hi Nice example >_< I'd always flipped an image by initiating a param and passing the param to _GDIPlus_ImageSaveToFileEx() as in the Help file shows under the _GDIPlus_ParamInit() example. But I like your method better as it's easier to follow... good job , neato You should write that "GdipImageRotateFlip" into function format and submit it for GDIPlus.au3 UDF Cheers Thank you expandcollapse popup#include <GDIPlus.au3> Global enum _ $RotateNoneFlipNone = 0 , _ $Rotate90FlipNone = 1 , _ $Rotate180FlipNone = 2 , _ $Rotate270FlipNone = 3 , _ $RotateNoneFlipX = 4 , _ $Rotate90FlipX = 5 , _ $Rotate180FlipX = 6 , _ $Rotate270FlipX = 7 , _ $RotateNoneFlipY = 6 , _ $Rotate90FlipY = 7 , _ $Rotate180FlipY = 4 , _ $Rotate270FlipY = 5 , _ $RotateNoneFlipXY = 6 , _ $Rotate90FlipXY = 7 , _ $Rotate180FlipXY = 0 , _ $Rotate270FlipXY = 1 _GDIPlus_Startup () $hImage = _GDIPlus_ImageLoadFromFile (@MyDocumentsDir & "\GDIPlus_Image.jpg") _GDIPlus_ImageRotateFlip($hImage,$Rotate90FlipNone) _GDIPlus_ImageSaveToFile ($hImage, @MyDocumentsDir & "\GDIPlus_Image2.jpg") _WinAPI_DeleteObject ($hImage) _GDIPlus_ShutDown () ; #FUNCTION# ==================================================================================================================== ; Name...........: _GDIPlus_mageRotateFlip ; Description ...: rotates and flips an image ; Syntax.........: _GDIPlus_mageRotateFlip($hImage,$rfType) ; Parameters ....: $hImage - Handle to an image object ; $rfType ;[in] Element of the RotateFlipType enumeration that specifies the type of ; rotation and the type of flip. ; ; Return values .: Success - True ; Failure - False ; =============================================================================================================================== Func _GDIPlus_ImageRotateFlip($hImage,$rfType) Local $aResult $aResult = DllCall($ghGDIPDll,"int","GdipImageRotateFlip","hwnd",$hImage,"long",$rfType) If @error Then Return SetError(@error, @extended, False) Return SetError($aResult[0], 0, $aResult[0] = 0) EndFunc Edited August 25, 2009 by wolf9228 صرح السماء كان هنا 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