I want to convert a TGA file to a PNG file without using the Batch Converter user interface. Is there a way to accomplish this either through command line or COM automation?
While /ob from the command line opens the Batch Conversion user interface, this requires user input that I want to avoid.
I have not tried it but I believe you could automate some of this with the Snagit COM API.
You would need to setup a ImageCapture that has a Input of siiGraphicFile which will indicate a image file will be used for the input of this capture. The COM API does not let you specify a filename, instead it pops up a file-open dialog to get the image file to be used as input.
Then the same ImageCapture should be setup to have a Output of sioFile and then use OutputImageFile to set a specific file to output to along with indicating it should be output as PNG format. For this case I think you can use the OutputImageFile or OutputImageFile2 properties to setup the filename.
The only issue with this approach is that File-Open dialog that will appear where you would still need to interact with the UI to open the .tga file. You might be able to automate this also by simulating keystrokes and sending them to the File-Open dialog to automate the opening of a given graphics file.
More information on the Snagit COM API is here