Skip to content

๐ŸŒธ Convert and compress your image files using bash scripts! ๐ŸŒธ

License

Notifications You must be signed in to change notification settings

Moenmyna/Mass-Image-CC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

50 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Mass image compression and conversion scripts

Note

As of 30 Oct 2024, the scripts have been re-written into one main script for ease of use; as well as to leverage additional features from Gum! I recommend using this over the individual loose scripts to avoid cluttering your $PATH as well as for the easier use ๐Ÿ˜Š

This repo contains some bash scripts that I've made to help me reduce the size of images on my drives.

Here you'll find scripts that convert images primarily to either AVIF or JXL. Most people will probably want to use the AVIF scripts due to support for JXL being low (Unfortunately...๐Ÿ˜ข) but feel free to use what you prefer! Additionally all the scripts have comments inside describing what they do, so please look at their source if their purpose is unclear.

A gif of img-cc in action, made with VHS!

Caution

Disclaimer: My hope in sharing these is that they will be found useful but please note that you do so at your own risk! I am not responsible for any potential loss of data that may occur when using these scripts!

Installation and Usage

Pre-requisites

Required if using img-cc

  • Gum 0.14.5 or above

Using img-cc

Clone the repo and if necessary, give img-cc execute permissions with chmod +x. Then just symlink img-cc anywhere that's on your $PATH, such as ~/.local/bin.

Once done, navigate to a folder in your terminal with the images you want to convert, run the script by typing img-cc and choose the prompt appropriate to what you want to convert!

Once done, you will find all the original images that were converted in the _review folder that was created at the start. If the converted images look good, then feel free to remove the images in _review!

Using the loose legacy scripts

As before, I recommend cloning this repo to a folder of your choosing and then symlinking the scripts you want to your ~/.local/bin from the repo. You can also place them anywhere you'd like, as long as they're on your $PATH. Make sure that the scripts have execute permissions with chmod +x if necessary!

To use the scripts once they are in ~/.local/bin, in a terminal, move to the folder containing the images that you want to convert and run the appropriate script.

For example, if you wanted to convert all .png files in ~/Pictures to .avif, do this:

cd ~/Pictures
png-avif

Once done, look for the original images in _review and if the converted images look good, feel free to remove the images in the folder!

About

๐ŸŒธ Convert and compress your image files using bash scripts! ๐ŸŒธ

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages