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


In reply to Re^3: Executing external programs by kcott
in thread Executing external programs by Silt

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.