jamegon Posted November 26, 2020 Share Posted November 26, 2020 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 More sharing options...
Nine Posted November 26, 2020 Share Posted November 26, 2020 You can resize the picture to a 50% scale. See _GDIPlus_ImageResize in help file. Please use this tool when you post code. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy 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