thumbCreate is a simple C++ command line tool that uses ImageMagick for taking a directory of images and rescaling them to a given width or height to generate thumbnails. Original images are not overwritten.
- Download/Clone ImageMagick source
- extract and navigate to the root directory of extracted files
- run
./configure CXX=g++ CXXFLAGS=-O2 - run
make - run
make install - Download/Clone
thumbCreate.cpp - compile with:
g++ -O2 thumbCreate.cpp `Magick++-config --cppflags --cxxflags --ldflags --libs` -std=c++17 -o thumbCreate.out
- run with: ./thumbCreate.out /path/to/images width height
- Example: ./thumbCreate.out /Users/timination/photos 200 200
note: a thumbnails directory is created within the given path, it does not check if this already exists and images inside of thumbnails with matching output filenames will be overwritten.
E.g. if I rescale image_x.jpg, it will create /thumbnails/image_x_thumbnail.jpg which may be overwritten by another image_x_thumbnail.jpg.
Pull requests are welcome.