jarun / imgp

:camera_flash: Fast batch image resizer and rotator
GNU General Public License v3.0
1.03k stars 50 forks source link

Specify output directory? #35

Closed shinebayar-g closed 4 years ago

shinebayar-g commented 4 years ago

Hi, thanks for the tool. Is it possible to specify output directory?

jarun commented 4 years ago

Please raise a PR.

Just ensure the output directory is not a subdir of the any of the source directories (including default current dir) being processed.

jarun commented 4 years ago

There's another problem. Say we are passing an output fir which does not overlap with any of the source dirs. But what if 2 source dirs have a file with the same name? With multicore processing we may end up in a race condition. I would like to avoid locking reads and writes to files to save on time and processing.

In case you are having issues in collecting the processed files, the following command will move the _IMGP files to a destination directory:

mv -i *_IMGP.* destdir