cramaboule Posted October 9, 2009 Share Posted October 9, 2009 (edited) Hello all, I was looking on the Internet to find a simple picture converter for a whole batch. Guess what? I was amazed that I didn't find anything free. So I decided to write one in AutoIt! Here we are... Enjoy ! EDIT1: Misstypo EDIT2: Added new Version ! EDIT3: Added V1.2 (bugs fixed) Here is the New version 29/10/2009 EDIT4: New version V2.0.0.0: resizing ability !!!! 😊😇😁😎 EDIT5: New version: V3.0.0.0: Added WebP (from https://developers.google.com/speed/webp/download) and subfolder scan 😉 Pics-Converter.au3 Pics-Converterv2.au3 PicsConverterV3 (GitHub) Edited May 31 by cramaboule My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
Zedna Posted October 9, 2009 Share Posted October 9, 2009 (edited) Nice and simple! Tips for improvement: - autodetect input type - set output file time according to input one - for JPG new option for "quality" - remove Sleep(10) from FOR/NEXT loop Note: There is freeware IrfanView tool for batch image conversions Edited October 9, 2009 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
cramaboule Posted October 10, 2009 Author Share Posted October 10, 2009 Thanks for the comments !- autodetect input typeI knew some one would make this comment !!!!! - set output file time according to input one'dont konw how to do that !!! - for JPG new option for "quality"Hummmmmm okay,...- remove Sleep(10) from FOR/NEXT loopI put this one just to see the progress bar... (to be able so see the progress bar moving !)Note: There is freeware IrfanView tool for batch image conversionsArrrr yes, but I am not a fan of IrfanView.I see what I can make !Cramaboule My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
Zedna Posted October 10, 2009 Share Posted October 10, 2009 'dont konw how to do that !!! Look at FileGetTime() and FileSetTime() Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
cramaboule Posted October 11, 2009 Author Share Posted October 11, 2009 Look at FileGetTime() and FileSetTime()Sorry, I misunderstood what you meant!!!Okay Now I understand... I have put the same date and time as the originals ones...Okay so... looks easy to do !!!But why is the reason of doing that ??? My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
cramaboule Posted October 12, 2009 Author Share Posted October 12, 2009 Nice and simple!Tips for improvement: - autodetect input type- set output file time according to input one- for JPG new option for "quality"- remove Sleep(10) from FOR/NEXT loopNote: There is freeware IrfanView tool for batch image conversionsHi Zedna,New version with your ideas of improvement !!! Cramaboule My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
Zepx Posted October 21, 2009 Share Posted October 21, 2009 I'm getting this error, --------------------------- AutoIt Error --------------------------- Line 120 (File "D:\Autoit\Pics-Converter.au3"): If IsDllStruct($TParam) Then $Param = DllStructGetPtr($TParam) If IsDllStruct(^ ERROR Error: Variable used without being declared. --------------------------- OK --------------------------- Link to comment Share on other sites More sharing options...
cramaboule Posted October 29, 2009 Author Share Posted October 29, 2009 I'm getting this error, --------------------------- AutoIt Error --------------------------- Line 120 (File "D:\Autoit\Pics-Converter.au3"): If IsDllStruct($TParam) Then $Param = DllStructGetPtr($TParam) If IsDllStruct(^ ERROR Error: Variable used without being declared. --------------------------- OK --------------------------- Ah !!! Me too.... It's happens when you convert from jpg to bmp for instance !!! C. My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
cramaboule Posted October 29, 2009 Author Share Posted October 29, 2009 New version corrected on the first post !!! Enjoy !!! Cramaboule ! My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
aymhenry Posted November 9, 2009 Share Posted November 9, 2009 WAW I was locking for some program like that, I need to learn about the structure of of all those format. I hope if it is possible also for videos & sound format wmv avi mpeg... etc. Grate ... Link to comment Share on other sites More sharing options...
KeithDawn Posted November 10, 2009 Share Posted November 10, 2009 Awesome script, I'm gonna us it the next time I unload my camera to the computer and don't feel like manually reducing 200 images to send to friends. On a side-tangent though, does anyone know of a script that would allow someone to select a folder of images and randomize the names of all files within, without changing the files? It's probably easily done, just a way to rename mass files, only randomly to some degree, but the problem is I suck at coding. Thanks anyway for the script. Link to comment Share on other sites More sharing options...
Skrip Posted November 11, 2009 Share Posted November 11, 2009 Awesome script, I'm gonna us it the next time I unload my camera to the computer and don't feel like manually reducing 200 images to send to friends.On a side-tangent though, does anyone know of a script that would allow someone to select a folder of images and randomize the names of all files within, without changing the files? It's probably easily done, just a way to rename mass files, only randomly to some degree, but the problem is I suck at coding.Thanks anyway for the script.Let's not take over this thread, but I can work on that for ya when I get home. When it's done, I'll start a new thread as to not screw up this one. [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
QED Posted November 11, 2009 Share Posted November 11, 2009 Hi CramabouleJust wanted to say thank you for a piece of code I found in your excellent example. It’s the part about setting gdi+ jpg encoder quality. I've modified the variable names to be analogous to the help file and reproduced it below.; Set up parameters for 90% JPEG quality $JPGQuality=90 $tData = DllStructCreate("int Quality") DllStructSetData($tData, "Quality", $JPGQuality) $tParams = _GDIPlus_ParamInit(1) _GDIPlus_ParamAdd($tParams, $GDIP_EPGQUALITY, 1, $GDIP_EPTLONG, DllStructGetPtr($tData))The AutoIt help file is brilliant and I managed to build almost my entire script just using the help. The problem was I didn’t have a clue how to modify the “90 degree rotation” example to “JPG Quality”.Considering how low the default jpg quality is – your example should be used by everybody who needs to save a jpg. I hope the developers will consider using your example in the help file.QED Link to comment Share on other sites More sharing options...
Dolemite50 Posted November 17, 2009 Share Posted November 17, 2009 Handy-dandy script here, great job! The only problem I ran into was that it didn't seem to retain transparency in PNGs. Beyond that, hat's off! Link to comment Share on other sites More sharing options...
cramaboule Posted December 11, 2009 Author Share Posted December 11, 2009 @All, Thanks a lot ! Cramaboule :-) My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
cramaboule Posted December 11, 2009 Author Share Posted December 11, 2009 The AutoIt help file is brilliant and I managed to build almost my entire script just using the help. The problem was I didn’t have a clue how to modify the “90 degree rotation” example to “JPG Quality”.Hum,... you know I am not really the best one at DLLSomeone can Help Him ???Cram... My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
wazer Posted May 25, 2013 Share Posted May 25, 2013 Would be nice if it could mass convert to given extension without selecting what extention your files are at first. Link to comment Share on other sites More sharing options...
cramaboule Posted May 31 Author Share Posted May 31 New version V3. see firts post ! My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
cramaboule Posted May 31 Author Share Posted May 31 On 5/25/2013 at 9:59 PM, wazer said: Would be nice if it could mass convert to given extension without selecting what extention your files are at first. Yep... will do it. I thought the same making the version 3 ! My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
cramaboule Posted June 2 Author Share Posted June 2 V3.0.1.0 02.06.2023: - Improved: faster search with _ArrayConcatenate() - Changed: -lossless can be used with -q (for WebP) - Improved: faster conversion using -mt for WebP https://developers.google.com/speed/webp/docs/cwebp - Improved: optimize decodig webp https://github.com/webmproject/libwebp/blob/0905f61c8511f080bec75ba98f67d53bb2906ccf/doc/tools.md - Added: Decoders from GDI+ - Added: auto select input encoder ioa747 1 My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website 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