marcgii wrote: ↑
Wed Nov 14, 2018 2:14 am
So I have a xbs file which has the complete convert configuration I want to use. Can use this file as a input to nConvert? It doesn't seem that I can. I had also hoped to use the export to batch function, but that doesn't include any of the output format options. It only included the resize options.
I have no experience of the xbs export option, and as you say the export for NConvert option doesn't include the required input and output code. However, those shouldn't be hard to add. I believe the code exported from batch convert also often includes terms that are not in fact needed, possibly because the values are default values when NConvert is run.
At the moment, all I'm trying to do is convert and resize a single specified image, and specify the output location. What is the best way to accomplish this using only scripts? If the only way is figuring out the nconvert syntax, can someone assist?
I would suggest that you start by getting a minimal code running, and then add additional options one by one until you have final code that meets your needs. The following code that just reads the source PNG file and outputs a similar JPEG file should run without any difficulty: if it doesn't, stop and describe the problem you encounter if you are unable to overcome it.
Code: Select all
nconvert -out jpeg -q 75 -o "D:\Test\output.jpeg" "D:\Test\input.png"
When that code runs add the required resize option, and when that works any other options you actually need one by one; if you encounter a problem stop and try to overcome it, if necessary by liberal use of trial and error experimentation, and then if necessary post the issue you have encountered.
Note: If you don't have a copy of the NConvert help file you should create one, or if necessary consult the [least out of date] version in the NConvert section of the forum.