{"id":22001702,"url":"https://github.com/panodata/imagecast","last_synced_at":"2026-02-11T17:03:42.573Z","repository":{"id":54162114,"uuid":"269809911","full_name":"panodata/imagecast","owner":"panodata","description":"Imagecast is like ImageMagick but for Pythonistas. Optionally provides its features via HTTP API.","archived":false,"fork":false,"pushed_at":"2024-03-25T12:31:40.000Z","size":76,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-03-27T18:23:30.373Z","etag":null,"topics":["http","http-proxy","image","image-conversion","image-manipulation","image-processing","image-processing-library","image-processing-python","image-proxy","image-resize","image-resizer","image-resizing","image-resolution","image-scaling","image-size","proxy","proxy-server","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/panodata.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-06-05T23:41:40.000Z","updated_at":"2024-04-15T01:25:25.232Z","dependencies_parsed_at":"2024-01-25T00:27:41.302Z","dependency_job_id":"574e4119-67b7-4831-849d-ec2556ec697b","html_url":"https://github.com/panodata/imagecast","commit_stats":{"total_commits":43,"total_committers":2,"mean_commits":21.5,"dds":"0.13953488372093026","last_synced_commit":"43ee32ff6614bc80dbccc2f850151988b98b8422"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panodata%2Fimagecast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panodata%2Fimagecast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panodata%2Fimagecast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panodata%2Fimagecast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/panodata","download_url":"https://codeload.github.com/panodata/imagecast/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245061386,"owners_count":20554563,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["http","http-proxy","image","image-conversion","image-manipulation","image-processing","image-processing-library","image-processing-python","image-proxy","image-resize","image-resizer","image-resizing","image-resolution","image-scaling","image-size","proxy","proxy-server","rest-api"],"created_at":"2024-11-29T23:14:44.676Z","updated_at":"2026-02-11T17:03:37.553Z","avatar_url":"https://github.com/panodata.png","language":"Python","readme":"#########\nImagecast\n#########\n\n|\n\n.. start-badges\n\n|ci-tests| |ci-coverage| |license| |pypi-downloads|\n|python-versions| |status| |pypi-version|\n\n.. |ci-tests| image:: https://github.com/panodata/imagecast/actions/workflows/tests.yml/badge.svg\n    :target: https://github.com/panodata/imagecast/actions/workflows/tests.yml\n\n.. |ci-coverage| image:: https://codecov.io/gh/panodata/imagecast/branch/main/graph/badge.svg\n    :target: https://codecov.io/gh/panodata/imagecast\n    :alt: Test suite code coverage\n\n.. |python-versions| image:: https://img.shields.io/pypi/pyversions/imagecast.svg\n    :target: https://python.org\n\n.. |pypi-version| image:: https://img.shields.io/pypi/v/imagecast.svg\n    :target: https://pypi.org/project/imagecast/\n\n.. |status| image:: https://img.shields.io/pypi/status/imagecast.svg\n    :target: https://pypi.org/project/imagecast/\n\n.. |license| image:: https://img.shields.io/pypi/l/imagecast.svg\n    :target: https://pypi.org/project/imagecast/\n\n.. |pypi-downloads| image:: https://static.pepy.tech/badge/imagecast/month\n    :target: https://pepy.tech/project/imagecast\n\n.. end-badges\n\n\n*****\nAbout\n*****\n\nImagecast is like ImageMagick but for Pythonistas. It is based on Pillow_,\nand optionally provides its features via HTTP API.\n\n\n*******\nInstall\n*******\n\nCLI interface::\n\n    pip install imagecast\n\nWith HTTP API service::\n\n    pip install imagecast[service]\n\n\n********\nFeatures\n********\n\n- Colorspace conversion: monochrome, grayscale\n- Cropping with negative right/bottom offsets\n- Resizing while keeping aspect ratio\n- Output format: Any image formats from Pillow or raw bytes\n- HTML DOM capturing using Playwright\n- HTTP API, effectively implementing an image\n  acquisition and conversion service\n\n\n********\nSynopsis\n********\n\n::\n\n    # Display on screen\n    imagecast --uri=\"$IMGURL\" --display\n\n    # Colorspace reduction to bi-level with threshold, output as bytes\n    imagecast --uri=\"$IMGURL\" --monochrome=200 --format=bytes\n\n    # Colorspace reduction, cropping, resizing and format conversion\n    imagecast --uri=\"$IMGURL\" --grayscale --crop=40,50,-50,-40 --width=200 --save=test.png\n\n    # HTML DOM capturing\n    imagecast --uri=\"$HTMLURL\" --element=\"#logo\"\n\nExamples::\n\n    # Image manipulation\n    imagecast --uri=\"https://unsplash.com/photos/WvdKljW55rM/download?force=true\" --monochrome=80 --crop=850,1925,-950,-900 --width=640 --display\n\n    # HTML DOM capturing\n    imagecast --uri=\"https://www.iana.org/help/example-domains\" --element=\"#logo\"\n\nHTML DOM capturing\n==================\n\nImagecast can also capture screenshots of webpages, or elements thereof. It uses\n`Playwright`_ and `Firefox`_ to convert full pages or specific DOM elements\nto bitmaps.\n\nAfter installing Imagecast, run::\n\n    playwright install firefox\n\nThen, invoke Imagecast like::\n\n    imagecast --uri=\"${URL}\" --display\n\nIn order to select specific elements for capturing, use the ``--element`` option\nto express a DOM selector to apply::\n\n    imagecast --uri=\"${URL}\" --element=\"#panel-1\" --display\n\n\nHTTP API\n========\n\n``imagecast`` also provides its features using an HTTP API.\n\nStart the Imagecast service as daemon::\n\n    imagecast service\n\nExamples::\n\n    # Image manipulation\n    http \"http://localhost:9999/?uri=https%3A%2F%2Funsplash.com%2Fphotos%2FWvdKljW55rM%2Fdownload%3Fforce%3Dtrue\u0026monochrome=80\u0026crop=850,1925,-950,-900\u0026width=640\"\n\n    # HTML DOM capturing\n    http \"http://localhost:9999/?uri=https://www.iana.org/help/example-domains\u0026element=%23logo\"\n\n\n.. note::\n\n    You should not run the service without restricting the\n    list of allowed remote hosts on the public internet.\n\n    To do that, invoke the service like::\n\n        imagecast service --allowed-hosts=unsplash.com,media.example.org\n\n    By default, no host will be allowed. If you really need to enable access\n    to all upstream hosts, use ``--allowed-hosts=*``. All host names must be\n    listed explicitly, wildcard notations like ``*.iana.org`` are not permitted.\n\n\n*********\nPrior Art\n*********\n\n- https://github.com/DictGet/ecce-homo\n- https://github.com/agschwender/pilbox\n- https://github.com/francescortiz/image\n\n\n.. _Firefox: https://www.mozilla.org/firefox/\n.. _Pillow: https://pillow.readthedocs.io/\n.. _Playwright: https://playwright.dev/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanodata%2Fimagecast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpanodata%2Fimagecast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanodata%2Fimagecast/lists"}