Page 1 of 1

How create a .bat file for Light Image Resizer 6

Posted: Fri Aug 27, 2021 6:17 am
by khalid hosain
Hello every one!
This is my first post.
I want to create a .bat file for resize Selected Image with the Settings
Action: Replace original
Size = 500KB
How can I do that?

Re: How create a .bat file for Light Image Resizer 6

Posted: Fri Aug 27, 2021 3:11 pm
by Phil
Not all of the options are available as command line parameters. We will add more in the next release.
You can create a profile with your options though, and call that via command line.
For example:

Code: Select all

resize.exe /profile="my profile"
Depending on the image content and output dimensions, setting the file size can lead to bad image quality in some cases. Keep that in mind, especially when overwriting originals.

Re: How create a .bat file for Light Image Resizer 6

Posted: Fri Aug 27, 2021 8:12 pm
by khalid hosain

Code: Select all

"%ProgramFiles(x86)%\ObviousIdea\Light Image Resizer 6\Resize.exe"
When I Run This command in Command Prompt then it's run Light Image Resizer fine But When I Run

Code: Select all

"%ProgramFiles(x86)%\ObviousIdea\Light Image Resizer 6\Resize.exe /profile=coverart"
This command in CMD then it's returns "The directory name is invalid."
My Profile name is "coverart"
What the wrong I am doing

Re: How create a .bat file for Light Image Resizer 6

Posted: Sat Aug 28, 2021 1:55 pm
by Phil
You need to enclose the path in double quotes as it contains spaces. This is also recommended for the profile name.
This should work:

Code: Select all

"%ProgramFiles(x86)%\ObviousIdea\Light Image Resizer 6\Resize.exe" /profile="coverart"

Re: How create a .bat file for Light Image Resizer 6

Posted: Sat Aug 28, 2021 2:04 pm
by khalid hosain
After using this code in CMD, Light Image Resizer has Run & Show a Dialogbox:

Code: Select all

Invalid parameter or Value: profile=coverart

Re: How create a .bat file for Light Image Resizer 6

Posted: Sat Aug 28, 2021 5:19 pm
by Phil
It means no profile with this name was found. You need to make sure the profile exists and name is correct.
You can check the exact name and/or rename the profile by clicking the "..." button, and selecting "Rename".

Re: How create a .bat file for Light Image Resizer 6

Posted: Sat Aug 28, 2021 5:50 pm
by khalid hosain
Finally its Wroked. The Profile Name is Case Sensitive. I should type

Code: Select all

Coverart
Thanks for the support. What is the Keyboard shortcut key for the

Code: Select all

Next button
after I add the Images, Enter doesn't work here,
I have another issue, Should I asked in this Post or Should I Create a New Post for that?

Re: How create a .bat file for Light Image Resizer 6

Posted: Sat Aug 28, 2021 6:26 pm
by Phil
Are you adding your images via command line as well? In that case you can add the /run parameter to start processing directly.
Please see this reference for all the parameters: https://www.obviousidea.com/windows-sof ... arameters/

If your other question is related to command line use, feel free to post it here. If not, better create a new topic.