Jump to content

Resize Png


Alek
 Share

Recommended Posts

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...