Skip to content

Diamond427/image-process-uuid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Features

  • Convert filenames of every images to certain format based on time and uuid
  • Convert different format of images (e.g. jpeg, png, webp) to other format
  • Logging errors to log files

Function Arguments:

  • src_dir: absolute path of source directory
  • dst_dir optional: absolute path of destination directory; default = src_dir
  • image_format optional: format of output image; defaults to save original format
  • out_fname_format optional: template string for output image filename; defaults to %d_%u; %u: uuid_v4; %d: timestamp
  • delete_source optional: delete source images; defaults to False
  • logger optional: Logger for errors; default save logs to file

Sample Usage:

convert_files(
  src_dir=r"C:\Users\Admin\Pictures\sample",
  dst_dir=r"C:\Users\Admin\Pictures\normalized",
  image_format="png",
  out_fname_format="thermal_%d_%u",
  delete_source=False
)

About

Convert filenames of every images to uuid format

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages