zz-pix


Namezz-pix JSON
Version 0.0.9 PyPI version JSON
download
home_pagehttps://github.com/sean1832/pix
SummaryCLI tool for image manipulation
upload_time2024-06-22 06:27:46
maintainerNone
docs_urlNone
authorZeke Zhang
requires_python>=3.9
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PIX
[![PyPI - Version](https://img.shields.io/pypi/v/zz-pix)](https://pypi.org/project/zz-pix)
[![PyPI - License](https://img.shields.io/pypi/l/zz-pix)](LICENSE)
[![Downloads](https://static.pepy.tech/badge/zz-pix)](https://pepy.tech/project/zz-pix)

![PyPI - Python Version](https://img.shields.io/pypi/pyversions/zz-pix)

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
- [x] Resize
- [x] Crop
- [x] Convert
- [x] Prune (remove low-quality images)
- [x] Caption (add text & metadata to images)
- [x] Transparency
- [ ] Watermark
- [ ] Grayscale

## 💻 Installation

### Using pip (Recommended)
```sh
pip install zz-pix
```

### From Source
```bash
git clone https://github.com/sean1832/pix.git
cd pix
pip install .
```

## 🔨 Usage

### Basic Usage

```sh
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](#convert) | Converts images to a different format            |
| [resize](#resize)   | Resizes images                                   |
| [crop](#crop)       | Crops images                                     |
| [prune](#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`.

```sh
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.
```sh
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.
```sh
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.
```sh
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](LICENSE)


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sean1832/pix",
    "name": "zz-pix",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Zeke Zhang",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/ad/f1/5bb2cc0cf5f34a59c2c4a1dd040cd7a98fc406a576b3febd9a3447923a8d/zz-pix-0.0.9.tar.gz",
    "platform": null,
    "description": "# PIX\r\n[![PyPI - Version](https://img.shields.io/pypi/v/zz-pix)](https://pypi.org/project/zz-pix)\r\n[![PyPI - License](https://img.shields.io/pypi/l/zz-pix)](LICENSE)\r\n[![Downloads](https://static.pepy.tech/badge/zz-pix)](https://pepy.tech/project/zz-pix)\r\n\r\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/zz-pix)\r\n\r\nA simple image manipulation tool for the terminal.\r\n\r\n> \u2b50\ufe0f Like this repo? please consider a star!\r\n\r\n> \ud83d\udca1 This project is still earily in its development. Please report any bugs or issues you encounter.\r\n\r\n## \ud83c\udf1f Features\r\n- [x] Resize\r\n- [x] Crop\r\n- [x] Convert\r\n- [x] Prune (remove low-quality images)\r\n- [x] Caption (add text & metadata to images)\r\n- [x] Transparency\r\n- [ ] Watermark\r\n- [ ] Grayscale\r\n\r\n## \ud83d\udcbb Installation\r\n\r\n### Using pip (Recommended)\r\n```sh\r\npip install zz-pix\r\n```\r\n\r\n### From Source\r\n```bash\r\ngit clone https://github.com/sean1832/pix.git\r\ncd pix\r\npip install .\r\n```\r\n\r\n## \ud83d\udd28 Usage\r\n\r\n### Basic Usage\r\n\r\n```sh\r\npix [COMMAND] [OPTIONS]\r\n```\r\n\r\nReplace `[COMMAND]` with the desired operation and `[OPTIONS]` with the relevant options for your command.\r\n\r\n### Global Options\r\n\r\n- `-v`, `--version`: Display the version of the tool.\r\n- `-h`, `--help`: Display the help message.\r\n\r\n### Commands\r\n\r\n| Command             | Description                                      |\r\n| ------------------- | ------------------------------------------------ |\r\n| [convert](#convert) | Converts images to a different format            |\r\n| [resize](#resize)   | Resizes images                                   |\r\n| [crop](#crop)       | Crops images                                     |\r\n| [prune](#prune)     | Removes images smaller than specified resolution |\r\n\r\n### Command Options\r\n\r\n#### Convert\r\nConverts images to a different formats. Currently supports `JPEG`, `PNG`, `WEBP`, `TIFF`, `ICO`, `AVIF`, `HEIF`, `BMP`.\r\n\r\n```sh\r\npix convert input.jpg output.webp [OPTIONS]\r\n```\r\n\r\n| Option                | Input Type | Description                              | Default      |\r\n| --------------------- | ---------- | ---------------------------------------- | ------------ |\r\n| `input`               | String     | Input image or directory                 | N/A          |\r\n| `output`              | String     | Output image or directory                | Current dir. |\r\n| `-f`, `--format`      | String     | Output format (supported formats listed) | N/A          |\r\n| `-q`, `--quality`     | Integer    | Output quality (0-100)                   | 95           |\r\n| `--no-optimize`       | Flag       | Disable optimization                     | N/A          |\r\n| `-o`, `--overwrite`   | Flag       | Overwrite existing files                 | N/A          |\r\n| `-t`, `--transparent` | Flag       | Preserve transparency                    | N/A          |\r\n| `--prefix`            | String     | Prefix for the output file name          | \"\"           |\r\n| `--surfix`            | String     | Suffix for the output file name          | \"\"           |\r\n\r\n#### Resize\r\nResizes images to a specified size or scale.\r\n```sh\r\npix resize input.jpg output.jpg [OPTIONS]\r\n```\r\n\r\n| Option        | Input Type | Description               | Default      |\r\n| ------------- | ---------- | ------------------------- | ------------ |\r\n| `input`       | String     | Input image or directory  | N/A          |\r\n| `output`      | String     | Output image or directory | Current dir. |\r\n| `--overwrite` | Flag       | Overwrite existing files  | N/A          |\r\n| `--size`      | String     | Output size (WxH)         | N/A          |\r\n| `--scale`     | Float      | Output scale (0.0-1.0)    | N/A          |\r\n\r\n#### Crop\r\nCrops images to a specified size and position.\r\n```sh\r\npix crop input.jpg output.jpg [OPTIONS]\r\n```\r\n\r\n\r\n| Option        | Input Type | Description                                  | Default      |\r\n| ------------- | ---------- | -------------------------------------------- | ------------ |\r\n| `input`       | String     | Input image or directory                     | N/A          |\r\n| `output`      | String     | Output image or directory                    | Current dir. |\r\n| `--overwrite` | Flag       | Overwrite existing files                     | N/A          |\r\n| `--ratio`     | String     | Aspect ratio (W:H), combined with `--align`  | N/A          |\r\n| `--size`      | String     | Exact size and position as WxH+X+Y           | N/A          |\r\n| `--align`     | String     | Alignment (top, bottom, left, right, center) | N/A          |\r\n\r\n#### Prune\r\nRemoves images smaller than a specified resolution.\r\n```sh\r\npix prune ./images [OPTIONS]\r\n```\r\n\r\n\r\n| Option               | Input Type | Description                                    | Default |\r\n| -------------------- | ---------- | ---------------------------------------------- | ------- |\r\n| input                | String     | Input image or directory                       | N/A     |\r\n| `-r`, `--resolution` | String     | Minimum resolution (WxH)                       | N/A     |\r\n| `--dry-run`          | Flag       | List files to be removed without deleting them | N/A     |\r\n\r\n\r\n\r\n\r\n## License\r\n[Apache-2.0](LICENSE)\r\n\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "CLI tool for image manipulation",
    "version": "0.0.9",
    "project_urls": {
        "Homepage": "https://github.com/sean1832/pix"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b2602711545cee02af58d241133265c56efc6785b32d8ec320311322e994c71b",
                "md5": "36c7aafa3d9876833b068ae72c0c3286",
                "sha256": "662fedad179bacf18031c9ed491609025a9051d96574e7934444635a1c16d7d9"
            },
            "downloads": -1,
            "filename": "zz_pix-0.0.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "36c7aafa3d9876833b068ae72c0c3286",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 13814,
            "upload_time": "2024-06-22T06:27:44",
            "upload_time_iso_8601": "2024-06-22T06:27:44.533173Z",
            "url": "https://files.pythonhosted.org/packages/b2/60/2711545cee02af58d241133265c56efc6785b32d8ec320311322e994c71b/zz_pix-0.0.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "adf15bb2cc0cf5f34a59c2c4a1dd040cd7a98fc406a576b3febd9a3447923a8d",
                "md5": "1748e50e0ae194316517b4adf4666c8c",
                "sha256": "3d1b987a37c08446373667705057a36c4c99072fd2d0b0a38585648baf55fee1"
            },
            "downloads": -1,
            "filename": "zz-pix-0.0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "1748e50e0ae194316517b4adf4666c8c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 13051,
            "upload_time": "2024-06-22T06:27:46",
            "upload_time_iso_8601": "2024-06-22T06:27:46.432245Z",
            "url": "https://files.pythonhosted.org/packages/ad/f1/5bb2cc0cf5f34a59c2c4a1dd040cd7a98fc406a576b3febd9a3447923a8d/zz-pix-0.0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-22 06:27:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sean1832",
    "github_project": "pix",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "zz-pix"
}
        
Elapsed time: 0.26527s