resize a batch of photos

The script will let you resize a batch of photos
2.2K Downloads
Updated 2 Oct 2010

View License

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
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.1.0.0

fix some bugs

1.0.0.0