resize a batch of photos
resizephotos -dir max_width_and_height, will let you choose a directory,
and resize all the photos in the directory. When max_width_and_height is
omitted, it uses 1600 by default(1600px is enough for most monitors).
resizephotos -files max_width_and_height, will let you choose some files,
and resize all the files in the directory.
You might be asked for whether to recursively resize all the photos in
subdirectories.
and You might be asked for whether to overwrite the original files. If
you choose 'No', the program will save the resized images in new
directories or files with prefix 'resize-'.
resizephotos(file_or_directory, max_width_and_height, is_recursive, ...
is_overwrite, path_to_save): you can use the function by specifying
the path of the directories and files. When using this method, you can
specific the max width and height of the resized photos. When path_to_save
is omitted, the path to save the resized photos will generated automatically
depends on is_overwrite parameter.
See also imresize
Copyright 2010, zhiqiang.org
author: zhang@zhiqiang.org, url: http://zhiqiang.org/blog/it/batch-resize-images-using-matlab.html
Cite As
Zhiqiang Zhang (2024). resize a batch of photos (https://www.mathworks.com/matlabcentral/fileexchange/28909-resize-a-batch-of-photos), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- Image Processing and Computer Vision > Image Processing Toolbox > Import, Export, and Conversion > Image Sequences and Batch Processing >
- MATLAB > Graphics > Images > Read, Write, and Modify Image >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.