Jump to content
jamegon

Reduce teh memory space a image take up

Recommended Posts

Good morning

I need to reduce the size of some png extension images. 
I convert them to jpg.
Is there any way to further reduce the memory space they take up, even if the quality is reduced?

Thanks

Javier

 

#include <GDIPlus.au3>


Example()

Func Example()
    Local $hImage, $sCLSID

      ; Initialize GDI+ library
    _GDIPlus_Startup()

    ; Load image
    $hImage = _GDIPlus_ImageLoadFromFile(@DesktopDir & "\SIGMET-AIRMET\TMA.png")

    ; Get JPEG encoder CLSID
    $sCLSID = _GDIPlus_EncodersGetCLSID("JPG")

    ; Save image
    _GDIPlus_ImageSaveToFileEx($hImage, @DesktopDir & "\TMA.jpg", $sCLSID)

    ; Shut down GDI+ library
    _GDIPlus_Shutdown()

EndFunc   ;==>Example
 

Share this post


Link to post
Share on other sites

You can resize the picture to a 50% scale. See _GDIPlus_ImageResize in help file.

Please use this tool when you post code.

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...