Skip to content

rachel-pai/web_images_toolkits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

web-image optimization toolkit

Files:

  • kmeans_comrepss.py: compressiong images by kmeans
    python kmeans_compress.py \
    --inputPath "your input image directory" \
    --outputPath "saved image folder" \
    --kcluster "how many colors want to be used in compressed image, default is 20" \
    --maxiters "how many iteratiosn for kmeans, default is 20"
    
  • optimize_images.py
  • convert_web_images.py: crop image and covert to webp format. Make sure webp installed/enabled in your computer
    python convert_web_images.py \
    --inputPath "your input image directory" \
    --outputPath "saved image folder" \
    --width 68 \
    --height 68 \
    --crop True #resize image if crop=False

Releases

No releases published

Packages

No packages published

Languages