myspacee Posted February 17, 2010 Share Posted February 17, 2010 Hello to all, use GDI to convert an image to another (png -> jpg) : #include <GDIPlus.au3> _Main() Func _Main() Local $hBitmap, $hImage, $sCLSID, $tData, $tParams ; Initialize GDI+ library _GDIPlus_Startup () ; Load image $hImage = _GDIPlus_ImageLoadFromFile ("01.png") ; Get JPEG encoder CLSID $sCLSID = _GDIPlus_EncodersGetCLSID ("JPG") ; Save image with rotation _GDIPlus_ImageSaveToFileEx ($hImage, "01.jpg", $sCLSID, DllStructGetPtr($tParams)) ; Shut down GDI+ library _GDIPlus_ShutDown () EndFunc ;==>_Main Read about _GDIPlus_GraphicsDrawImage that allow to draw an Image object, and think to use to resize obtained .jpg. But can't understand how use it ... Anyone can help me in this GDI convert&resing thing ? Thank you for your time, m. Link to comment Share on other sites More sharing options...
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
Already have an account? Sign in here.Sign In Now