Piyush Posted July 26, 2010 Share Posted July 26, 2010 Hi! ol... i just needed a code for decreasing resolution i.e making a thumbnail of an image...with same quality and of same extension...if the original image is png then the thumb should also be a png image.. plz help... [font="Comic Sans MS"][size="7"]Piyush.....[/size][/font][font="Palatino Linotype"][size="2"]Some Of My Scripts...Cool Font Generator Train Searcher and Tracer[/size][/font] Link to comment Share on other sites More sharing options...
mdwerne Posted July 26, 2010 Share Posted July 26, 2010 Hi! ol...i just needed a code for decreasing resolution i.e making a thumbnail of an image...with same qualityand of same extension...if the original image is png then the thumb should also be a png image..plz help...Maybe this?http://www.autoitscript.com/forum/index.php?showtopic=88637&st=0&p=636878&hl=Image%20Resizer&fromsearch=1&#entry636878 Link to comment Share on other sites More sharing options...
EndFunc Posted July 26, 2010 Share Posted July 26, 2010 AutoIt can't do this natively. Look for GDIPlus.au3 and try that. That should work for you. EndFuncAutoIt is the shiznit. I love it. Link to comment Share on other sites More sharing options...
Piyush Posted July 26, 2010 Author Share Posted July 26, 2010 (edited) @endfunc thnks for ur reply ..i knw that it can be done by GDI library but i know nothing about image processing so..it is very difficult for me..to understand.. Edited July 26, 2010 by Piyush [font="Comic Sans MS"][size="7"]Piyush.....[/size][/font][font="Palatino Linotype"][size="2"]Some Of My Scripts...Cool Font Generator Train Searcher and Tracer[/size][/font] Link to comment Share on other sites More sharing options...
matwachich Posted July 26, 2010 Share Posted July 26, 2010 Here is a function for you: Func _imageResize($oldImage, $newImage, $newW, $newH, $startGdiP = True) If $startGdiP Then _GDIPlus_Startup() $img = _GDIPlus_ImageLoadFromFile($oldImage) $gContext = _GDIPlus_ImageGetGraphicsContext($img) $newBmp = _GDIPlus_BitmapCreateFromGraphics($newW, $newH, $gContext) $gNewContext = _GDIPlus_ImageGetGraphicsContext($newBmp) _GDIPlus_GraphicsDrawImageRect($gNewContext, $img, 0, 0, $newW, $newH) _GDIPlus_ImageSaveToFile($newBmp, $newImage) _GDIPlus_ImageDispose($img) _GDIPlus_GraphicsDispose($gContext) _GDIPlus_GraphicsDispose($gNewContext) _GDIPlus_BitmapDispose($newBmp) If $startGdiP Then _GDIPlus_Shutdown() EndFunc ;==>_ImageResize Link to comment Share on other sites More sharing options...
Piyush Posted July 26, 2010 Author Share Posted July 26, 2010 thanks..@matwachich [font="Comic Sans MS"][size="7"]Piyush.....[/size][/font][font="Palatino Linotype"][size="2"]Some Of My Scripts...Cool Font Generator Train Searcher and Tracer[/size][/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