Giter VIP home page Giter VIP logo

picflip's Introduction

Picflip Image Converter

Picflip is a simple and efficient script for converting images to WebP format with optional resizing and quality adjustment.

Installation

Dependencies

Ensure you have Python installed. Download it from the official Python website.

Install the required Python packages:

pip install argparse pillow

Clone the Repository

git clone https://github.com/danielbarl/picflip.git
cd picflip

Setup on different OS

Windows

Add the Script Directory to Your PATH Variable:

  1. Press WIN and type env
  2. Click on Edit the system environment variables
  3. Click on Environment Variables...
  4. Under "System variables", find and select the Path variable, then click Edit...
  5. Click New and add the directory where the script is located
  6. Confirm with OK to close all dialog boxes

macOS and Linux

Add the script directory to PATH:

  1. Open the shell profile file:
    nano ~/.bashrc  # or use .zshrc, .profile depending on your shell
  2. Add the following line to the end of the file:
    export PATH="$PATH:/path/to/picflip"
  3. Source the profile to update the PATH:
    source ~/.bashrc # or the respective profile file

Usage

To see the available options and usage instructions, run:

picflip --help

Example commands

  • Convert a single image to WebP format with full size and full quality:
    picflip input.jpg output.webp
  • Convert a single image with specific width (800px) and quality (80%):
    picflip input.png output.webp --width 800 --quality 80
  • Convert all images in a directory to WebP format with default settings:
    picflip C:\input_dir C:\output_dir
  • Convert all images in a directory with specific width and quality, removing metadata:
    picflip C:\input_dir C:\output_dir --width 1024 --quality 75 --remove-metadata

Features

  • Supported Formats: JPEG, PNG, BMP, GIF, WEBP
  • Resizing: Maintain aspect ratio when resizing images
  • Quality Adjustment: Set the quality of the output WebP image
  • Metadata Removal: Optionally remove metadata from images

License

This project is licensed under the MIT License. See the LICENSE file for details.

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.