Sign in to follow this  
Followers 0
Alek

Resize Png

5 posts in this topic

is there way to resize PNG images with autoit?


[font="Impact"]Never fear, I is here.[/font]

Share this post


Link to post
Share on other sites



is there way to resize PNG images with autoit?

Try to use _GDIPlus_GraphicsDrawImageRect.


When the words fail... music speaks

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites

Make sure you use _GDIPlus_Startup() and _GDIPlus_Shutdown().

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0