Hello everyone,
Transforming images from one format such as JPEG, PNG, GIF, etc. to another. I got a png file image which is size in 8MB, the picture taken from the satellite, and I want to keep that image in smaller size for that I'm using online application such as jpeg compressor for compressing images it is good in image compression but I want to do this, through the windows command and also I want that it will convert file format from png to svg or jpeg through the windows command is it possible. Do you have any suggestion or recommendation it will appreciate.
Thank you.
File Format Conversion and compression through window command.
Moderators: Dorian (MJT support), JRL
- Dorian (MJT support)
- Automation Wizard
- Posts: 1378
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: File Format Conversion and compression through window command.
I'd investigate using ImageMagick via the command line with RunProgram.
I can't give specific ImageMagick examples to do this, but I'm fairly sure it would be able to do what you need.
I can't give specific ImageMagick examples to do this, but I'm fairly sure it would be able to do what you need.
Yes, we have a Custom Scripting Service. Message me or go here
- Dorian (MJT support)
- Automation Wizard
- Posts: 1378
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: File Format Conversion and compression through window command.
This might get you started : viewtopic.php?f=3&t=10590&hilit=Imagemagick#p45051
Yes, we have a Custom Scripting Service. Message me or go here
Re: File Format Conversion and compression through window command.
Thank you very much for you recommendation I'm going to try this if this will work surly I'll let you know.Dorian (MJT support) wrote: ↑Mon Feb 19, 2024 8:51 amThis might get you started : viewtopic.php?f=3&t=10590&hilit=Imagemagick#p45051
- Dorian (MJT support)
- Automation Wizard
- Posts: 1378
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: File Format Conversion and compression through window command.
I'm no expert on ImageMagick but managed to cobble this together, which will take Untitled.png and create Untitled.jpeg. I installed ImageMagick first.
And just as in the thread I linked to, this can be adapted to work in a loop and perform the same operation on every png in a folder.
Code: Select all
let>FilePath=C:\Path\To\Images
let>filename=Untitled.png
let>filenameout=Untitled.jpeg
let>IMPath=C:\Program Files\ImageMagick-7.1.1-Q16-HDRI\magick
Let>IMcommand=convert "%filepath%\%filename%" "%filepath%\%filenameout%"
RunProgram>%IMPath% %IMcommand%
Yes, we have a Custom Scripting Service. Message me or go here
-
- Newbie
- Posts: 7
- Joined: Fri Sep 07, 2012 8:41 am
- Location: Bournemouth
Re: File Format Conversion and compression through window command.
agree with Dorian there. We use the following in a loop to covert multipage tiff to PDF:
runprogram>%ImageMagikLocation%convert %varImageMagickFileNames% %workingDir%\%varOriginalFileName%
TimeStamp>%LogFileName%,RP_RESULT is %RP_RESULT% with ZERO being successful
wait>2
SetDialogProperty>Dialog22,Label2,Caption,Ran ImageMagik
wait>2
runprogram>%ImageMagikLocation%convert %varImageMagickFileNames% %workingDir%\%varOriginalFileName%
TimeStamp>%LogFileName%,RP_RESULT is %RP_RESULT% with ZERO being successful
wait>2
SetDialogProperty>Dialog22,Label2,Caption,Ran ImageMagik
wait>2
Jonathan