Giter VIP home page Giter VIP logo

pix's Introduction

PIX

PyPI - Version PyPI - License Downloads

PyPI - Python Version

A simple image manipulation tool for the terminal.

โญ๏ธ Like this repo? please consider a star!

๐Ÿ’ก This project is still earily in its development. Please report any bugs or issues you encounter.

๐ŸŒŸ Features

  • Resize
  • Crop
  • Convert
  • Prune (remove low-quality images)
  • Caption (add text & metadata to images)
  • Transparency
  • Watermark
  • Grayscale

๐Ÿ’ป Installation

Using pip (Recommended)

pip install zz-pix

From Source

git clone https://github.com/sean1832/pix.git
cd pix
pip install .

๐Ÿ”จ Usage

Basic Usage

pix [COMMAND] [OPTIONS]

Replace [COMMAND] with the desired operation and [OPTIONS] with the relevant options for your command.

Global Options

  • -v, --version: Display the version of the tool.
  • -h, --help: Display the help message.

Commands

Command Description
convert Converts images to a different format
resize Resizes images
crop Crops images
prune Removes images smaller than specified resolution

Command Options

Convert

Converts images to a different formats. Currently supports JPEG, PNG, WEBP, TIFF, ICO, AVIF, HEIF, BMP.

pix convert input.jpg output.webp [OPTIONS]
Option Input Type Description Default
input String Input image or directory N/A
output String Output image or directory Current dir.
-f, --format String Output format (supported formats listed) N/A
-q, --quality Integer Output quality (0-100) 95
--no-optimize Flag Disable optimization N/A
-o, --overwrite Flag Overwrite existing files N/A
-t, --transparent Flag Preserve transparency N/A
--prefix String Prefix for the output file name ""
--surfix String Suffix for the output file name ""

Resize

Resizes images to a specified size or scale.

pix resize input.jpg output.jpg [OPTIONS]
Option Input Type Description Default
input String Input image or directory N/A
output String Output image or directory Current dir.
--overwrite Flag Overwrite existing files N/A
--size String Output size (WxH) N/A
--scale Float Output scale (0.0-1.0) N/A

Crop

Crops images to a specified size and position.

pix crop input.jpg output.jpg [OPTIONS]
Option Input Type Description Default
input String Input image or directory N/A
output String Output image or directory Current dir.
--overwrite Flag Overwrite existing files N/A
--ratio String Aspect ratio (W:H), combined with --align N/A
--size String Exact size and position as WxH+X+Y N/A
--align String Alignment (top, bottom, left, right, center) N/A

Prune

Removes images smaller than a specified resolution.

pix prune ./images [OPTIONS]
Option Input Type Description Default
input String Input image or directory N/A
-r, --resolution String Minimum resolution (WxH) N/A
--dry-run Flag List files to be removed without deleting them N/A

License

Apache-2.0

pix's People

Contributors

sean1832 avatar

Watchers

 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.