GithubHelp home page GithubHelp logo

ryanpcmcquen / image-ultimator Goto Github PK

View Code? Open in Web Editor NEW
54.0 13.0 2.0 118 KB

:rice_scene: Make images amazing, recursively and automagically.

Home Page: https://imgult.github.io

License: Mozilla Public License 2.0

Shell 100.00%
image-processing image-optimization image-optimisation exif-removal hacktoberfest

image-ultimator's Introduction

imgult, The image-ultimator.

What is it?

imgult is a tiny and mighty script that will recursively loop through a directory and its subdirectories optimizing all GIFs, JPGs, PNGs and SVGs (the script supports several types of these kinds of extensions, check the source to see). It also removes EXIF data (run with EXIFREMOVE=n to keep EXIF data). You can backup the images by running it with (BACKUPIMAGES=true).

Check out the imgult site!

What do people say about it?

Torkiliuz succesfully tested imgult against a 26TB sample that had approximately 140GB of images. Wow! He made some helpful suggestions for the 4.0.01 release. Because of that, imgult now creates a file called imgult-processed-files.txt as a record of previously processed stuff. You can delete it if you do not mind files being processed again. ๐ŸŽ‰

I just want to run it once (it will kindly remove itself):

curl https://raw.githubusercontent.com/ryanpcmcquen/image-ultimator/master/imgult | sh

I love this script! I want to install it and use it everywhere!

wget -N https://raw.githubusercontent.com/ryanpcmcquen/image-ultimator/master/imgult; sudo install -m755 imgult /usr/local/bin/; rm imgult

PSST! To upgrade imgult, just run the same command as install (^^ THIS GUY ^^). It's just a shell script after all! ๐ŸŽ‰

Before you run it you need these amazing programs!

jpegoptim
mozjpeg
optipng
pngquant
gifsicle
exiv2
svgo

Check here to see the recommended minimum versions of these tools:

#5 (comment)

Of course, newer versions are probably even better! ๐Ÿ˜ƒ

Linux:

Slackware:

sbopkg -i jpegoptim -i mozjpeg -i optipng -i pngquant -i gifsicle

Fedora:

sudo dnf install jpegoptim optipng pngquant gifsicle exiv2

Ubuntu (16.04+ recommended):

sudo apt-get install jpegoptim optipng pngquant gifsicle exiv2

On some systems you will need to compile mozjpeg from source. You will probably need these:

Fedora:

sudo dnf install nasm libtool autoconf

Ubuntu (16.04+ recommended):

sudo apt-get install nasm libtool autoconf build-essential

Some Ubuntu systems will also require the following packages:

sudo apt-get install pkg-config libpng-dev

After that, download the most recent release and run something like this:

autoreconf -fiv
./configure --disable-static

make
sudo make install

Mac:

brew install jpegoptim mozjpeg optipng pngquant gifsicle exiv2

Linux & Mac:

npm install -g svgo

USE IMGULT AT YOUR OWN RISK!

Just run this command in any directory with images. It will OVERWRITE images (GIFs, JPGs, PNGs & SVGs), and loop recursively through all directories INSIDE the directory you run it in. There is a BACKUP option though. ;^)

If it is installed, how do I use it?
  • 'cd' to the directory you want to use it in

Run:

imgult

Or feed imgult directories and/or files:

imgult Downloads/ 1.png 2.jpg
EXIF removal

The default is to remove EXIF data, to keep EXIF data, run:

EXIFREMOVE=n imgult
BACKUPs

To back up all original images to imgult-backup-files/, run:

BACKUPIMAGES=true imgult

This can be run with the EXIF option as well:

EXIFREMOVE=n BACKUPIMAGES=true imgult
IMGATCH

To turn off the image matching service (which ignores previously processed files), either run imgult like so:

ENGAGE_IMGATCH_SERVICE=false imgult

Or, set your environment to have ENGAGE_IMGATCH_SERVICE to false (export it in .bashrc or .bash_profile).

image-ultimator's People

Contributors

ryanpcmcquen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

jroachgit piscon

image-ultimator's Issues

Memory usage on a huge count of images

Hello, thanks for the script!

However, when i tried to used in directory containing 14G of images, all 64GB of RAM disappeared :)

Can you please fix it? Looks like all processes start without any wait for previously started processes.

2016-02-20 1 08 30

Enhancement: Remember processed files

Could you make it so that imgult remembers processed files, similarly to how rsync does? Mainly this is useful so that if the computer crashes during processing imgult can skip already processed files.

Default to keep exif data

Can you reconsider, Please keep exif data for default, for location search and copyright support.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.