python-image-tools


Namepython-image-tools JSON
Version 0.4 PyPI version JSON
download
home_pagehttps://github.com/amirhamiri/python-image-tools
Summarypython-image-tools is a python package for working with images
upload_time2023-01-27 16:31:44
maintainer
docs_urlNone
authorAmirhossein Amiri
requires_python
licenseMIT
keywords image download python resize
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # python-image-tools
The python-image-tools is a python package that allows you to easily download an image from a given URL and manipulate it.

## Installation
- Run `pip install python-image-tools`

### Usage
To use the class, you first need to import it:

```python
from image_tools import ImageDownloader

img = ImageDownloader("https://www.example.com/image.jpg")
```
### Download an Image
To download an image, you can use the `download_image` method:
```python
img.download_image()
```

### Resize an Image
To resize an image, you can use the `resize_image` method, passing in the desired width and height of the image:
```python
img.resize_image(500, 500)
```

### Resize an Image by Percent
To resize an image by a certain percent, you can use the `resize_image_by_percent` method, passing in the desired percent:
```python
img.resize_image_by_percent(50)
```

### Change Image format
To change image format, you can use the `change_image_format` method, passing in the desired format:
```python
img.change_image_format("png")
```

### Reduce Image size
To reduce image size, you can use the `reduce_image_size` method, passing in the desired size in kilobytes:
```python
img.reduce_image_size(50)
```

### Rename Image
To rename image, you can use the `rename_image` method, passing in the desired name:
```python
img.rename_image('test')
```
### Note
- If you want to resize the image to a specific file size, you should first reduce the image file size to your desired file size and then change the image format to a format that supports compression such as JPEG.

- The class will overwrite the original image file, so make sure to save a copy of the original image before using the class.

### Support
If you have any issues or questions, please don't hesitate to reach out to us at amirhamiri74@gmail.com.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/amirhamiri/python-image-tools",
    "name": "python-image-tools",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "image,download,python,resize",
    "author": "Amirhossein Amiri",
    "author_email": "amirhamiri74@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/56/d1/fe6f8e2419693ead86ab5ff1f88383e43b720a506c7e2c1cbdd21a43b9fb/python-image-tools-0.4.tar.gz",
    "platform": null,
    "description": "# python-image-tools\nThe python-image-tools is a python package that allows you to easily download an image from a given URL and manipulate it.\n\n## Installation\n- Run `pip install python-image-tools`\n\n### Usage\nTo use the class, you first need to import it:\n\n```python\nfrom image_tools import ImageDownloader\n\nimg = ImageDownloader(\"https://www.example.com/image.jpg\")\n```\n### Download an Image\nTo download an image, you can use the `download_image` method:\n```python\nimg.download_image()\n```\n\n### Resize an Image\nTo resize an image, you can use the `resize_image` method, passing in the desired width and height of the image:\n```python\nimg.resize_image(500, 500)\n```\n\n### Resize an Image by Percent\nTo resize an image by a certain percent, you can use the `resize_image_by_percent` method, passing in the desired percent:\n```python\nimg.resize_image_by_percent(50)\n```\n\n### Change Image format\nTo change image format, you can use the `change_image_format` method, passing in the desired format:\n```python\nimg.change_image_format(\"png\")\n```\n\n### Reduce Image size\nTo reduce image size, you can use the `reduce_image_size` method, passing in the desired size in kilobytes:\n```python\nimg.reduce_image_size(50)\n```\n\n### Rename Image\nTo rename image, you can use the `rename_image` method, passing in the desired name:\n```python\nimg.rename_image('test')\n```\n### Note\n- If you want to resize the image to a specific file size, you should first reduce the image file size to your desired file size and then change the image format to a format that supports compression such as JPEG.\n\n- The class will overwrite the original image file, so make sure to save a copy of the original image before using the class.\n\n### Support\nIf you have any issues or questions, please don't hesitate to reach out to us at amirhamiri74@gmail.com.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "python-image-tools is a python package for working with images",
    "version": "0.4",
    "split_keywords": [
        "image",
        "download",
        "python",
        "resize"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c37a07ee815b5b1f84e44dd4ce6af158a608f5bb877167b71eaaf2bb4ca1dbf5",
                "md5": "42fafbd68b0dc8c648070f2460444a05",
                "sha256": "d4ffbb1024c079a39758bc40b173655bab08386ee96b2793dff17d2a8329d652"
            },
            "downloads": -1,
            "filename": "python_image_tools-0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "42fafbd68b0dc8c648070f2460444a05",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5539,
            "upload_time": "2023-01-27T16:31:42",
            "upload_time_iso_8601": "2023-01-27T16:31:42.826621Z",
            "url": "https://files.pythonhosted.org/packages/c3/7a/07ee815b5b1f84e44dd4ce6af158a608f5bb877167b71eaaf2bb4ca1dbf5/python_image_tools-0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "56d1fe6f8e2419693ead86ab5ff1f88383e43b720a506c7e2c1cbdd21a43b9fb",
                "md5": "98ffd42129d96262326b6139d6473b1c",
                "sha256": "467d08389f56e19e6309e6a651a27165143b0dc525034e2b4ace7ea3381d4c7b"
            },
            "downloads": -1,
            "filename": "python-image-tools-0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "98ffd42129d96262326b6139d6473b1c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4929,
            "upload_time": "2023-01-27T16:31:44",
            "upload_time_iso_8601": "2023-01-27T16:31:44.338675Z",
            "url": "https://files.pythonhosted.org/packages/56/d1/fe6f8e2419693ead86ab5ff1f88383e43b720a506c7e2c1cbdd21a43b9fb/python-image-tools-0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-27 16:31:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "amirhamiri",
    "github_project": "python-image-tools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "python-image-tools"
}
        
Elapsed time: 0.05458s