Scripted/Batch cropping? - RealWorld forums

Log-in or register.

Scripted/Batch cropping?

in RW Icon Editor
kunkel321
on May 19th 2015

Hi Vlasta,
Is it possible to make RWIE do batch cropping of PNGs, prior to batch conversion into ICO? My thought is to have a folder-full of images that are (for example) 132x132 pixels, and then RWIE would trim off 2 pixels all the way around (top/bottom/left/right), leaving 128x128. The 128x128 PNGs would than be converted into icons. -steve

Vlasta
on May 19th 2015

Yes, that should not be too hard. You can use the "Raster Image - Canvas Size" command in one of the custom batch operations and set the "Adjust size by" fields to -4.

I am not sure how familiar you are with configuring the batch operation, but it should be relatively simple in this case. On the Batch page, select one of the custom operations, click configure, then make it so that there are two steps in a sequence, first being the "Raster Image - Canvas Size" op and the second being "Batch - Save to Destination Folder". (You may want to save the current batch operation before you start configuring it in case you would want to return to it.)

If the GUI is too clunky, I can prepare a file that can just be imported.

kunkel321
on May 19th 2015

That was so easy it's embarrassing! I have to tell you, I've searched all over the internet for different software to bulk-crop images. There are very few options out there. In fact I am not familiar with scripting (Though you've written several 'importable' scripts for me in past years), but despite my lack of knowledge, it took less time to setup that bulk operation in RealWorld Icon Editor, than I previously spent doing a google search for other applications! And it works perfectly!

Kudos to you Vlasta -- and many thanks!

A note to others though, the Config Batch Op window is small when it opens. There's a blue message on the configuration part that says, "Too small for a custom config dialog, Click here to switch to table view." Don't do that. Instead, just make the window bigger and you'll get the needed form controls.

Thanks again Vlasta.
(and feel free to quote any part of this forum post!) -steve

Page views: 3088       Posts: 3      
What about ICL files?
Vista & Win 7 icons
Select background