imgwizard


Nameimgwizard JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://github.com/chigwell/imgwizard
SummarySimple image resizing and caching using wsrv.nl service
upload_time2024-03-09 16:04:15
maintainer
docs_urlNone
authorEugene Evstafev
requires_python>=3.7
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![PyPI version](https://badge.fury.io/py/imgwizard.svg)](https://badge.fury.io/py/imgwizard)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
[![Downloads](https://static.pepy.tech/badge/imgwizard)](https://pepy.tech/project/imgwizard)

# ImgWizard

`ImgWizard` is a Python package that simplifies image resizing and caching by interfacing with the `wsrv.nl` service. It supports a range of image formats and manipulations, making it an ideal tool for developers needing to dynamically adjust images in their applications.

## Installation

To install `ImgWizard`, you can use pip:

```bash
pip install imgwizard
```

## Usage

`ImgWizard` is designed to be intuitive and easy to use. Here's a quick start example:

```python
from imgwizard import ImgWizard

img = ImgWizard('https://i.ibb.co/tHzGgg9/Screenshot-2024-03-09-at-16-00-21.png')
resized_image_url = img.resize(width=300, height=300, fit='cover').fetch()
print(resized_image_url)
```

This example demonstrates how to resize an image to a 300x300 dimension using the `cover` fit option and then fetches the URL of the processed image.

### Cropping Images

You can easily crop images by specifying alignment or using a smart crop:

```python
cropped_image_url = img.crop(alignment='top').fetch()
print(cropped_image_url)
```

### Applying Adjustments

Apply various adjustments such as blur, contrast, and tint:

```python
adjusted_image_url = img.apply_adjustments(blur=5, contrast=15, tint='blue').fetch()
print(adjusted_image_url)
```

### Changing Image Format

Convert images to different formats with quality adjustments:

```python
formatted_image_url = img.set_format(output_format='png', quality=50).fetch()
print(formatted_image_url)
```

## Before and After Examples

**Original Image:**

![Original Image](https://i.ibb.co/tHzGgg9/Screenshot-2024-03-09-at-16-00-21.png)

**Resized Image:**

![Resized Image](https://wsrv.nl/?url=i.ibb.co/tHzGgg9/Screenshot-2024-03-09-at-16-00-21.png&w=300&h=300&fit=cover)

**Cropped Image:**

![Cropped Image](https://wsrv.nl/?url=i.ibb.co/tHzGgg9/Screenshot-2024-03-09-at-16-00-21.png&w=300&h=300&fit=cover&a=top)

**Adjusted Image:**

![Adjusted Image](https://wsrv.nl/?url=i.ibb.co/tHzGgg9/Screenshot-2024-03-09-at-16-00-21.png&w=300&blur=5&con=15&tint=blue)

**Reformatted Image:**

![Reformatted Image](https://wsrv.nl/?url=i.ibb.co/tHzGgg9/Screenshot-2024-03-09-at-16-00-21.png&w=300&output=png&q=50)

## Features

- Supports resizing, cropping, and various image adjustments such as blur, contrast, and tint.
- Easy integration with Python projects for dynamic image manipulation.
- Leverages the global caching and delivery capabilities of Cloudflare via `wsrv.nl`.

## Contributing

Your contributions are welcome! If you have suggestions or issues, please feel free to open an issue or submit a pull request on the [GitHub repository](https://github.com/yourusername/imgwizard/issues).

## License

`ImgWizard` is available under the [MIT License](https://opensource.org/licenses/MIT). Feel free to use it in your projects and contribute back to the open-source community.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/chigwell/imgwizard",
    "name": "imgwizard",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "Eugene Evstafev",
    "author_email": "chigwel@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/44/45/1487beea2bdae1c565a10f06c2d57140d97023885c0bfccdcc7ce661d38f/imgwizard-0.0.1.tar.gz",
    "platform": null,
    "description": "[![PyPI version](https://badge.fury.io/py/imgwizard.svg)](https://badge.fury.io/py/imgwizard)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n[![Downloads](https://static.pepy.tech/badge/imgwizard)](https://pepy.tech/project/imgwizard)\n\n# ImgWizard\n\n`ImgWizard` is a Python package that simplifies image resizing and caching by interfacing with the `wsrv.nl` service. It supports a range of image formats and manipulations, making it an ideal tool for developers needing to dynamically adjust images in their applications.\n\n## Installation\n\nTo install `ImgWizard`, you can use pip:\n\n```bash\npip install imgwizard\n```\n\n## Usage\n\n`ImgWizard` is designed to be intuitive and easy to use. Here's a quick start example:\n\n```python\nfrom imgwizard import ImgWizard\n\nimg = ImgWizard('https://i.ibb.co/tHzGgg9/Screenshot-2024-03-09-at-16-00-21.png')\nresized_image_url = img.resize(width=300, height=300, fit='cover').fetch()\nprint(resized_image_url)\n```\n\nThis example demonstrates how to resize an image to a 300x300 dimension using the `cover` fit option and then fetches the URL of the processed image.\n\n### Cropping Images\n\nYou can easily crop images by specifying alignment or using a smart crop:\n\n```python\ncropped_image_url = img.crop(alignment='top').fetch()\nprint(cropped_image_url)\n```\n\n### Applying Adjustments\n\nApply various adjustments such as blur, contrast, and tint:\n\n```python\nadjusted_image_url = img.apply_adjustments(blur=5, contrast=15, tint='blue').fetch()\nprint(adjusted_image_url)\n```\n\n### Changing Image Format\n\nConvert images to different formats with quality adjustments:\n\n```python\nformatted_image_url = img.set_format(output_format='png', quality=50).fetch()\nprint(formatted_image_url)\n```\n\n## Before and After Examples\n\n**Original Image:**\n\n![Original Image](https://i.ibb.co/tHzGgg9/Screenshot-2024-03-09-at-16-00-21.png)\n\n**Resized Image:**\n\n![Resized Image](https://wsrv.nl/?url=i.ibb.co/tHzGgg9/Screenshot-2024-03-09-at-16-00-21.png&w=300&h=300&fit=cover)\n\n**Cropped Image:**\n\n![Cropped Image](https://wsrv.nl/?url=i.ibb.co/tHzGgg9/Screenshot-2024-03-09-at-16-00-21.png&w=300&h=300&fit=cover&a=top)\n\n**Adjusted Image:**\n\n![Adjusted Image](https://wsrv.nl/?url=i.ibb.co/tHzGgg9/Screenshot-2024-03-09-at-16-00-21.png&w=300&blur=5&con=15&tint=blue)\n\n**Reformatted Image:**\n\n![Reformatted Image](https://wsrv.nl/?url=i.ibb.co/tHzGgg9/Screenshot-2024-03-09-at-16-00-21.png&w=300&output=png&q=50)\n\n## Features\n\n- Supports resizing, cropping, and various image adjustments such as blur, contrast, and tint.\n- Easy integration with Python projects for dynamic image manipulation.\n- Leverages the global caching and delivery capabilities of Cloudflare via `wsrv.nl`.\n\n## Contributing\n\nYour contributions are welcome! If you have suggestions or issues, please feel free to open an issue or submit a pull request on the [GitHub repository](https://github.com/yourusername/imgwizard/issues).\n\n## License\n\n`ImgWizard` is available under the [MIT License](https://opensource.org/licenses/MIT). Feel free to use it in your projects and contribute back to the open-source community.\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Simple image resizing and caching using wsrv.nl service",
    "version": "0.0.1",
    "project_urls": {
        "Homepage": "https://github.com/chigwell/imgwizard"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c3868859044da1abfa7cd069abea26cff3fbbc4e2c790784e53cf0798e7a8975",
                "md5": "460fe43a741cfe501220a745d6e3af5d",
                "sha256": "80ebb5618357c42b8fecb6f671ff3db5283103e367eb33433cf6271aed8a6d33"
            },
            "downloads": -1,
            "filename": "imgwizard-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "460fe43a741cfe501220a745d6e3af5d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 5073,
            "upload_time": "2024-03-09T16:04:13",
            "upload_time_iso_8601": "2024-03-09T16:04:13.091573Z",
            "url": "https://files.pythonhosted.org/packages/c3/86/8859044da1abfa7cd069abea26cff3fbbc4e2c790784e53cf0798e7a8975/imgwizard-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "44451487beea2bdae1c565a10f06c2d57140d97023885c0bfccdcc7ce661d38f",
                "md5": "a563443225264e1cff6022ad51a26170",
                "sha256": "64042ebb8ee8371fac2edaa51782a0e2e2bd92c235fdc9d0620370d6fe9c1eee"
            },
            "downloads": -1,
            "filename": "imgwizard-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "a563443225264e1cff6022ad51a26170",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 4414,
            "upload_time": "2024-03-09T16:04:15",
            "upload_time_iso_8601": "2024-03-09T16:04:15.104363Z",
            "url": "https://files.pythonhosted.org/packages/44/45/1487beea2bdae1c565a10f06c2d57140d97023885c0bfccdcc7ce661d38f/imgwizard-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-09 16:04:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "chigwell",
    "github_project": "imgwizard",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "imgwizard"
}
        
Elapsed time: 0.61869s