Answer the question
In order to leave comments, you need to log in
How / what is the easiest way to edit several hundred images in the same way?
Given : 500 PNG images of the same size (say, 100x100px), peacefully lying in the same folder on the local hard drive.
It is necessary No. 1 : from each of the available images, take a rectangular area of a given size and position (say, with coordinates [10; 10] - [20; 20] relative to the image itself) and throw it into a separate PNG file. Well, that is, as a result, another 500 files will appear in the folder, say 001.png, 002.png, 003.png - or with names somehow derived from the original ones, it doesn’t matter.
It is necessary No. 2 : in each of the available images, fill in a fixed rectangular area (say, the same one with coordinates [10; 10] - [20; 20] relative to the image itself) with white color, and save the resulting image instead of the original one. That is, to a file with the same name.
Question : What is the most convenient and easiest way to do this, given that the task is one-time, that is, it will not need to be repeated anymore (which should exclude the option “write powerful specialized software that will be cool to do should be No. 1 and No. 2”)? Software ready to use (if so, which one)? Write a script? Many, many hard-working Indians, armed with Paint, please also do not offer.
Thank you!
Answer the question
In order to leave comments, you need to log in
xnview does it with a bang, just draw the white picture you want and batch process it.
I would solve this with imagemagick.
convert test.png -crop 10x10+10+10 -repage 10x10 test2.png
(unfortunately now there is nowhere to test) - more details htrd.su/wiki/zhurnal/2012/02/16/imagemagick_vyrezanie_proizvolnoj_oblasti_ozobrazhenija The
second point is more difficult, you need something like -flatten, but here you need to play around, let the experts tell you
If Photoshop is installed, make an Action in it and set it on files from the folder. This is the easiest and most convenient option. Spend 30-60 seconds creating an Action and a few minutes waiting to be applied to your files.
If photoshop is not worth it, download Imagemagick, figure out the options and make batch files (two pieces) perform the necessary actions on your files. Imagemagick can cut out fragments, draw rectangles, and a thousand other actions.
IrfanView both tasks can be implemented: Press the
letter B (atch), add all the necessary files
For step
1, set up CROP
1) FastStine Image Viewer - Tools - Batch conversion - Change settings - Advanced settings - Crop - Specify XY coordinates.
It is easier to find other settings there
2) The second task can be solved in the same place using the watermark function
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question