cs.imageutils


Namecs.imageutils JSON
Version 20240422.1 PyPI version JSON
download
home_pageNone
SummaryVarious ad hoc image related utility functions and classes.
upload_time2024-04-22 06:16:37
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseGNU General Public License v3 or later (GPLv3+)
keywords python3
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Various ad hoc image related utility functions and classes.

*Latest release 20240422.1*:
Updated DISTINFO.

## Function `sixel(imagepath: str) -> str`

Return the filesystem path of a cached SIXEL version of the
image at `imagepath`.

## Function `sixel_from_image_bytes(image_bs: bytes) -> str`

Return the filesystem path of a cached SIXEL version of the
image data in `image_bs`.

## Class `ThumbnailCache(cs.cache.ConvCache)`

A class to manage a collection of thumbnail images.

*Method `ThumbnailCache.create_thumbnail(self, imagepath: str, thumbpath: str, max_edge: int)`*:
Write a thumbnail image no larger than `max_edge`x`max_edge`
of `imagepath` to `thumbpath`.

*Method `ThumbnailCache.thumb_for_path(self, dx, dy, imagepath)`*:
Return the path to the thumbnail of at least `(dx,dy)` size for `imagepath`.
Creates the thumbnail if necessary.

Parameters:
* `dx`, `dy`: the target display size for the thumbnail.
* `image`: the source image, an image file pathname or a
  PIL Image instance.

The generated thumbnail will have at least these dimensions
unless either exceeds the size of the source image.
In that case the original source image will be returned;
this result can be recognised with an identity check.

Thumbnail paths are named after the SHA1 digest of their file content.

*Method `ThumbnailCache.thumb_scale(self, dx, dy)`*:
Compute thumbnail size from target dimensions.

# Release Log



*Release 20240422.1*:
Updated DISTINFO.

*Release 20240422*:
Initial PyPI release with ThumbnailCache and SIXEL functions.


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "cs.imageutils",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "python3",
    "author": null,
    "author_email": "Cameron Simpson <cs@cskk.id.au>",
    "download_url": "https://files.pythonhosted.org/packages/b7/b0/ec629bcaadca99b650f9802090ff8ddd21f52d27bd83ae1d6a2f55510bd0/cs.imageutils-20240422.1.tar.gz",
    "platform": null,
    "description": "Various ad hoc image related utility functions and classes.\n\n*Latest release 20240422.1*:\nUpdated DISTINFO.\n\n## Function `sixel(imagepath: str) -> str`\n\nReturn the filesystem path of a cached SIXEL version of the\nimage at `imagepath`.\n\n## Function `sixel_from_image_bytes(image_bs: bytes) -> str`\n\nReturn the filesystem path of a cached SIXEL version of the\nimage data in `image_bs`.\n\n## Class `ThumbnailCache(cs.cache.ConvCache)`\n\nA class to manage a collection of thumbnail images.\n\n*Method `ThumbnailCache.create_thumbnail(self, imagepath: str, thumbpath: str, max_edge: int)`*:\nWrite a thumbnail image no larger than `max_edge`x`max_edge`\nof `imagepath` to `thumbpath`.\n\n*Method `ThumbnailCache.thumb_for_path(self, dx, dy, imagepath)`*:\nReturn the path to the thumbnail of at least `(dx,dy)` size for `imagepath`.\nCreates the thumbnail if necessary.\n\nParameters:\n* `dx`, `dy`: the target display size for the thumbnail.\n* `image`: the source image, an image file pathname or a\n  PIL Image instance.\n\nThe generated thumbnail will have at least these dimensions\nunless either exceeds the size of the source image.\nIn that case the original source image will be returned;\nthis result can be recognised with an identity check.\n\nThumbnail paths are named after the SHA1 digest of their file content.\n\n*Method `ThumbnailCache.thumb_scale(self, dx, dy)`*:\nCompute thumbnail size from target dimensions.\n\n# Release Log\n\n\n\n*Release 20240422.1*:\nUpdated DISTINFO.\n\n*Release 20240422*:\nInitial PyPI release with ThumbnailCache and SIXEL functions.\n\n",
    "bugtrack_url": null,
    "license": "GNU General Public License v3 or later (GPLv3+)",
    "summary": "Various ad hoc image related utility functions and classes.",
    "version": "20240422.1",
    "project_urls": {
        "URL": "https://bitbucket.org/cameron_simpson/css/commits/all"
    },
    "split_keywords": [
        "python3"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1d980bf715ba40b1468041f057a029c9fe538491990566663aff15177311387c",
                "md5": "d553656012c3764bcdfc9ee3eab97cda",
                "sha256": "4e43e4bc8756830cfd005034c0ae0b0100c8c0305ec19cf3760be078d8a418c8"
            },
            "downloads": -1,
            "filename": "cs.imageutils-20240422.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d553656012c3764bcdfc9ee3eab97cda",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 3960,
            "upload_time": "2024-04-22T06:16:34",
            "upload_time_iso_8601": "2024-04-22T06:16:34.792725Z",
            "url": "https://files.pythonhosted.org/packages/1d/98/0bf715ba40b1468041f057a029c9fe538491990566663aff15177311387c/cs.imageutils-20240422.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b7b0ec629bcaadca99b650f9802090ff8ddd21f52d27bd83ae1d6a2f55510bd0",
                "md5": "87934f3775f719073682b1eeded652c0",
                "sha256": "957806c366308611b61aefdbeccf5ccfb3059dbd2bc72fa94d6594738b48d663"
            },
            "downloads": -1,
            "filename": "cs.imageutils-20240422.1.tar.gz",
            "has_sig": false,
            "md5_digest": "87934f3775f719073682b1eeded652c0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3615,
            "upload_time": "2024-04-22T06:16:37",
            "upload_time_iso_8601": "2024-04-22T06:16:37.066237Z",
            "url": "https://files.pythonhosted.org/packages/b7/b0/ec629bcaadca99b650f9802090ff8ddd21f52d27bd83ae1d6a2f55510bd0/cs.imageutils-20240422.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-22 06:16:37",
    "github": false,
    "gitlab": false,
    "bitbucket": true,
    "codeberg": false,
    "bitbucket_user": "cameron_simpson",
    "bitbucket_project": "css",
    "lcname": "cs.imageutils"
}
        
Elapsed time: 0.24325s