in reply to Re^2: Executing external programs
in thread Executing external programs
G'day Silt,
"Does this example make it more clear?"
Yes, that helps. I was about to search for a script, that I provided to someone here years ago, that embedded an editor in Tk. I don't need to do that now. :-)
I don't have MSWin available nor am I familiar with "paint.net"; however, I can tell you how I would do this on my platform using an application that's also available on your platform.
The application is called ImageMagick. It comes with a commandline tool called convert. I've used this many times, mainly for resizing images or converting images between one format and another; however, as its webpage says:
"Use the convert program to convert between image formats as well as resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more."
So, perhaps one or more of its features equate to whatever "apply effect" means. If so, download an appropriate "Windows Binary Release" and write your code.
You've not really provided sufficient information about your application to provide solid help with your code. If it's simply a one-off, quick-and-dirty script, you might get away with something like this:
my $input_options = ... my $output_options = ... my @files = ... for my $file (@files) { `convert $input_options $file $output_options ${file}.out`; }
Of course, if this is intended to be production-grade code, you'll want something more substantial.
I did have a very quick look at paint.net. I couldn't see any indication of a commandline tool but maybe you know of one: if so, you can probably use that with similar program logic.
— Ken
|
|---|