Jump to content

Recommended Posts

Posted (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.au3Fetching info...

Pics-Converterv2.au3Fetching info...

PicsConverterV3 (GitHub)

Edited by cramaboule
Posted

Thanks for the comments !

  Quote

- autodetect input type

I knew some one would make this comment !!!!! :idea:

  Quote

- set output file time according to input one

'dont konw how to do that !!! :P

  Quote

- for JPG new option for "quality"

Hummmmmm okay,...:)

  Quote

- remove Sleep(10) from FOR/NEXT loop

I put this one just to see the progress bar...:) (to be able so see the progress bar moving !)

  Quote

Note: There is freeware IrfanView tool for batch image conversions

Arrrr yes, but I am not a fan of IrfanView.:lol:

I see what I can make !

Cramaboule

Posted

  On 10/10/2009 at 10:27 PM, 'Zedna said:

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

Posted

  On 10/9/2009 at 3:42 PM, 'Zedna said:

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

Hi Zedna,

New version with your ideas of improvement !!! :)

Cramaboule

  • 2 weeks later...
Posted

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   
---------------------------
  • 2 weeks later...
Posted

  On 10/21/2009 at 8:36 AM, 'Zepx said:

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.

Posted

New version corrected on the first post !!!

Enjoy !!!

Cramaboule !

  • 2 weeks later...
Posted

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

Posted

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.

Posted

  On 11/10/2009 at 1:36 PM, 'KeithDawn said:

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]

Posted

Hi Cramaboule

Just 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

  • 4 weeks later...
Posted
Posted

  Quote

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 DLL

Someone can Help Him ???

Cram...

  • 3 years later...
Posted

Would be nice if it could mass convert to given extension without selecting what extention your files are at first.

Posted
  On 5/25/2013 at 7:59 PM, wazer said:

Would be nice if it could mass convert to given extension without selecting what extention your files are at first.

Expand  

Yep... will do it. I thought the same making the version 3 !

Posted

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

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