derrod Posted July 31, 2014 Share Posted July 31, 2014 (edited) Hi, I made the following script to scale a picture and save it to a file but it doesn't work: #include <GDIPlus.au3> #include <WindowsConstants.au3> Hotkeyset ("{F2}","_scale") While 1 Sleep(100) WEnd Func _scale() $hImage = _GDIPlus_BitmapCreateFromFile ( @ScriptDir & "/Data/2.bmp" ) $hScaleImage = _GDIPlus_ImageScale ( $hImage, 0.5, 0.5) _GDIPlus_ImageSaveToFile ( $hScaleImage, @ScriptDir & "/Data/22.bmp" ) EndFunc Please help, regards Derrod Edited July 31, 2014 by derrod Link to comment Share on other sites More sharing options...
UEZ Posted July 31, 2014 Share Posted July 31, 2014 derrod,dies ist ein englishsprachiges Forum. Also, wenn du in Deutsch schreiben möchtest, dann besuche einfach www.autoit.de. Ansonsten schreibe bitte in Englisch!Back to englisch:Please post your full code to see what's wrong.Br,UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
derrod Posted July 31, 2014 Author Share Posted July 31, 2014 @UEZ: Danke habs geändert! Link to comment Share on other sites More sharing options...
UEZ Posted July 31, 2014 Share Posted July 31, 2014 Try this: #include <GDIPlus.au3> #include <WindowsConstants.au3> _GDIPlus_Startup() Hotkeyset ("{F2}","_scale") Hotkeyset ("{ESC}","_Exit") While 1 Sleep(100) WEnd Func _scale() $hImage = _GDIPlus_BitmapCreateFromFile ( @ScriptDir & "/Data/2.bmp" ) $hScaleImage = _GDIPlus_ImageScale ( $hImage, 0.5, 0.5) _GDIPlus_ImageSaveToFile ( $hScaleImage, @ScriptDir & "/Data/22.bmp" ) EndFunc Func _Exit() _GDIPlus_Shutdown() Exit EndFunc Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
derrod Posted July 31, 2014 Author Share Posted July 31, 2014 Thank u very much! I forgot to start and shutdown the engine :/ 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