image-file-converter


Nameimage-file-converter JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/suqingdong/image_file_converter
SummaryToolkit for converting image files
upload_time2024-10-24 09:46:08
maintainerNone
docs_urlNone
authorsuqingdong
requires_pythonNone
licenseMIT License
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Toolkit for converting image files

## Installation

```bash
python -m pip install image_file_converter
```

## Usage in Python

```python
from image_file_converter.core import ImageFileConverter

# convert pdf to image or data_url
input_file = 'tests/test.pdf
converter = ImageFileConverter(input_file, dpi=300, max_page=5)
converter.to_image('output.png')
converter.to_image('output.jpg')
data_url = converter.to_data_url()
print(data_url)

# convert image to pdf or data_url
input_file = 'tests/test.png'
converter = ImageFileConverter(input_file)
converter.to_pdf('output.pdf')
data_url = converter.to_data_url()
print(data_url)
```

## Usage in CMD

```bash
image_file_converter --help
image_file_converter --version

# convert pdf to image
image_file_converter to_image tests/test.pdf -o output.png
image_file_converter to_image tests/test.pdf -o output.jpg
image_file_converter to_image tests/test.pdf -o output.png --dpi 300 --max-page 5

# convert image to pdf
image_file_converter to_pdf tests/test.png -o output.pdf
image_file_converter to_pdf tests/test.jpg -o output.pdf

# convert image or pdf to data_url
image_file_converter to_data_url tests/test.png
image_file_converter to_data_url tests/test.pdf
image_file_converter to_data_url tests/test.pdf --dpi 300 --max-page 5
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/suqingdong/image_file_converter",
    "name": "image-file-converter",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "suqingdong",
    "author_email": "suqingdong1114@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/59/07/2ef9c42eddec135aa98f58dcfcd989c0a3d47f945c3eae1d4626020af77b/image_file_converter-1.0.1.tar.gz",
    "platform": null,
    "description": "# Toolkit for converting image files\n\n## Installation\n\n```bash\npython -m pip install image_file_converter\n```\n\n## Usage in Python\n\n```python\nfrom image_file_converter.core import ImageFileConverter\n\n# convert pdf to image or data_url\ninput_file = 'tests/test.pdf\nconverter = ImageFileConverter(input_file, dpi=300, max_page=5)\nconverter.to_image('output.png')\nconverter.to_image('output.jpg')\ndata_url = converter.to_data_url()\nprint(data_url)\n\n# convert image to pdf or data_url\ninput_file = 'tests/test.png'\nconverter = ImageFileConverter(input_file)\nconverter.to_pdf('output.pdf')\ndata_url = converter.to_data_url()\nprint(data_url)\n```\n\n## Usage in CMD\n\n```bash\nimage_file_converter --help\nimage_file_converter --version\n\n# convert pdf to image\nimage_file_converter to_image tests/test.pdf -o output.png\nimage_file_converter to_image tests/test.pdf -o output.jpg\nimage_file_converter to_image tests/test.pdf -o output.png --dpi 300 --max-page 5\n\n# convert image to pdf\nimage_file_converter to_pdf tests/test.png -o output.pdf\nimage_file_converter to_pdf tests/test.jpg -o output.pdf\n\n# convert image or pdf to data_url\nimage_file_converter to_data_url tests/test.png\nimage_file_converter to_data_url tests/test.pdf\nimage_file_converter to_data_url tests/test.pdf --dpi 300 --max-page 5\n```\n\n\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Toolkit for converting image files",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://github.com/suqingdong/image_file_converter"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f51e6aba487f4183491f781dea3bc8693466fded50d8e535b27452181c9e53db",
                "md5": "19ca093a0ae437610c491e32e646d7e9",
                "sha256": "b50bdd65b2c99a6bcface22f4a0b2fb39be84ccfdf6d42ebe70c43fbcb6757f1"
            },
            "downloads": -1,
            "filename": "image_file_converter-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "19ca093a0ae437610c491e32e646d7e9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5339,
            "upload_time": "2024-10-24T09:46:06",
            "upload_time_iso_8601": "2024-10-24T09:46:06.955282Z",
            "url": "https://files.pythonhosted.org/packages/f5/1e/6aba487f4183491f781dea3bc8693466fded50d8e535b27452181c9e53db/image_file_converter-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "59072ef9c42eddec135aa98f58dcfcd989c0a3d47f945c3eae1d4626020af77b",
                "md5": "0f0378da9acb1c78913e07c7f7616697",
                "sha256": "1a2ac3dfc9ae3fd1c2248019fd96923789f90c91096b97bab422fe21976b7bab"
            },
            "downloads": -1,
            "filename": "image_file_converter-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "0f0378da9acb1c78913e07c7f7616697",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4395,
            "upload_time": "2024-10-24T09:46:08",
            "upload_time_iso_8601": "2024-10-24T09:46:08.446903Z",
            "url": "https://files.pythonhosted.org/packages/59/07/2ef9c42eddec135aa98f58dcfcd989c0a3d47f945c3eae1d4626020af77b/image_file_converter-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-24 09:46:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "suqingdong",
    "github_project": "image_file_converter",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "image-file-converter"
}
        
Elapsed time: 0.33260s