Jump to content

Reduce teh memory space a image take up


jamegon
 Share

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
 

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...