Giter Site home page Giter Site logo

cargo-imagermachine's Introduction

Welcome to Cargo Imagermachine ๐Ÿ‘‹

Version Documentation License: MIT Twitter: spaceoutPL

Rust cli for batch optimizing images

Cargo-imagermachine was designed as a subtool of cargo package manger, so user can run the interactive cli from the command line inside folders that contain pictures.

Imagermachine uses turbo-jpeg library for jpeg files optimization and oxi png for png images. You must install the turbo-jpeg yourself as the cli uses only the bindings to the turbo-jpeg library. Installation guide for respective systems below.

Imagermachine can:

  • Optimize png and jpg images.
  • Resize and crop images.
  • Rename the transformed files based on provided_name_(index).ext
  • Convert files to Webp
  • todo: set optimalisation custom config

Dependencies

So far the cli has been tested on unix systems (Debian, Mac).
Before using cargo-imagermachine you must install

Rust

Follow the official guideline for installing rust on your system https://www.rust-lang.org/tools/install

Libturbojpeg

Offical webiste and documentation ๐Ÿ‘‰ https://www.libjpeg-turbo.org/

Debian

sudo apt-get install libturbojpeg libturbojpeg0-dev

This should be enough to get started on Ubuntu

Mac

brew install jpeg-turbo

! Remember to copy all the export paths that brew will print out after installation, I am using the following config in the cargo.toml file, pkg-config (also via brew) installation is needed for this setup to work.

turbojpeg = {version = "0.4", features = ["image", "pkg-config"]}

If you have troubles linking the cli to your libturbo, you can try to edit the cargo.toml file and add feature flags into turbojpeg features array, for more reference follow this link.


Install

In order to install cargo-imagermachine on your computer, clone the project then run the following command from the project folder:

cargo install --path . 

Usage

If you followed the offical rust documentation and cargo / rustc is in scope, navigate to a input folder and run

cargo imagermachine

Follow directions on the interactive cli to optimize, resize, rename the images.

Author

๐Ÿ‘ค Lukasz Celitan

Show your support

Give a โญ๏ธ if this project helped you!

cargo-imagermachine's People

Contributors

dependabot[bot] avatar massivdash avatar

Watchers

 avatar  avatar  avatar

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.