Alek Posted August 14, 2008 Share Posted August 14, 2008 is there way to resize PNG images with autoit? [font="Impact"]Never fear, I is here.[/font] Link to comment Share on other sites More sharing options...
Andreik Posted August 14, 2008 Share Posted August 14, 2008 is there way to resize PNG images with autoit?Try to use _GDIPlus_GraphicsDrawImageRect. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
Alek Posted August 14, 2008 Author Share Posted August 14, 2008 Try to use _GDIPlus_GraphicsDrawImageRect. hmm, im proberly doing it wrong, but what i tried doing... Func _PngScale($s_image, $i_xscale, $i_yscale) $hImage = _GDIPlus_ImageLoadFromFile($s_image) $hGraphic =_GDIPlus_ImageGetGraphicsContext($hImage) _GDIPlus_GraphicsDrawImageRect($hGraphic, $hImage, 0,0, _GDIPlus_ImageGetWidth($hImage)*$i_xscale, _GDIPlus_ImageGetHeight($hImage)*$i_yscale) _GDIPlus_ImageSaveToFile ($hImage, @ScriptDir & "\Image.png") _GDIPlus_ImageDispose($hImage) _GDIPlus_GraphicsDispose($hGraphic) EndFunc [font="Impact"]Never fear, I is here.[/font] Link to comment Share on other sites More sharing options...
zorphnog Posted August 14, 2008 Share Posted August 14, 2008 Make sure you use _GDIPlus_Startup() and _GDIPlus_Shutdown(). Link to comment Share on other sites More sharing options...
Alek Posted August 14, 2008 Author Share Posted August 14, 2008 Make sure you use _GDIPlus_Startup() and _GDIPlus_Shutdown().yeah, i do have both, startup at the top and shutdown in onautoitexit. [font="Impact"]Never fear, I is here.[/font] 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