Giter VIP home page Giter VIP logo

img-to-webp's Introduction

Convert Images to WebP

This Python application provides a utility to convert image files to WebP format.

Getting Started

These instructions will get you up and running with the application on your local machine.

Prerequisites

  • Python 3.x

Installation

  • Clone the repo
git clone https://github.com/Osadhi/img-to-webp.git
  • Navigate into cloned directory
cd <repository>
  • Open the terminal or cmd in this directory. Install packages by using the command below.
pip install -r requirements.txt

Usage

Here's how to use the script:

python main.py -h

This will show the help message and explain the possible arguments:

usage: main.py [-h] [-f FILE] [-d DIR] [-o OUTPUT_DIR] [-r]

Convert Images to webp.

options:
  -h, --help            show this help message and exit
  -f FILE, --file FILE  Convert file
  -d DIR, --dir DIR     Convert files in dir
  -o OUTPUT_DIR, --output-dir OUTPUT_DIR
                        Output directory
  -r, --remove          Remove original image

Examples

To convert a single file:

python main.py -f /path/to/image.jpg

To convert all files in a directory:

python main.py -d /path/to/directory

To output the converted images to a specific directory:

python main.py -f /path/to/image.jpg -o /path/to/output/directory

To remove the original image after conversion:

python main.py -f /path/to/image.jpg -r

License

This project is licensed under the terms of the MIT license.

img-to-webp's People

Contributors

osadhi avatar deepsource-autofix[bot] avatar deepsource-io[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar

img-to-webp's Issues

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.