Anyone here experienced with imagemagick? I know that this command will scale down a bunch of images:
convert *.jp2 -scale 50% -quality 40 scaled-%d.jp2
but I'd also like to keep the original file names as part of the output file names. The above command produces output files named scaled-0.jp2, scaled-1.jp2 and so on. I'd like to have file names like [original file name]-scaled instead. While I'm at it, how can I activate scaling algorithms other than nearest neighbor (like catrom)?
I don't know this program at all, but just 'cause I'm curious, I went ahead and looked at their site. They say this for scale:
The results are thus equivalent to using -resize with a -filter setting of box. Though it is a lot faster, as it avoids all the filter processing of the image. As such it completely ignores the current -filter setting.
So -filter and -resize immediately look like what we want to me. -filter seems to have a bunch of options you can use, Catrom being one of them.
http://www.imagemagick.org/script/command-line-options.phphttp://www.imagemagick.org/script/command-line-processing.phpCtrl-F those to get to what you wanna look up. As for image name, with the few minutes I've spent looking this stuff up, I can't give a definite yes or no, but I did find a page that talks about the escape characters they use.
http://www.imagemagick.org/script/escape.phpI assume this is for all the command line options they have with a quick skimming, and if so, you might want to look at %i, %t, or %[base]. There could be others.
So, I'd imagine something like...
convert *.jp2 -filter Catrom -resize 50% %t-scaled.jp2
... would be close to something you'd want. Again, I'm just reading what they've said, so you might wanna look over it yourself a bit. Hope I've given a pointer or two, though.