stegonosaurus


Namestegonosaurus JSON
Version 1.2.3 PyPI version JSON
download
home_pagehttps://github.com/Geada734/stegonosaurus
SummaryStegonography utilities
upload_time2023-06-05 23:25:38
maintainer
docs_urlNone
authorGeada734
requires_python
licenseMIT
keywords steganography
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # stegonosaurus

*Ver 1.2.3*

Steganography functions packed in a convenient wheel. This library helps encode and decode messages into and out of multi-band .png images. Works with the [Image](https://pillow.readthedocs.io/en/stable/reference/Image.html) module of the Pillow library.

## Requirements
- Python3

## Installing

A simple pip install will do:

`pip install stegonosaurus`

## Functions

**inspect** *(img: PIL.Image) -> str:*

Returns a string that contains the values of each pixel in the image along with other relevant info such as image size, format, file name, mode, and whether it can be used with the other functions in the library or not.

**black** *(img: PIL.Image) -> PIL.Image:*

Return an all black copy of a provided image. This helps create a template for images with coded messages used for encoding.

**decode** *(img: PIL.Image, mode: str) -> PIL.Image:*

Decodes an image with a hidden message. This functions looks for pixels where the blue value is odd, and paints those pixels bright red. This function operates on two modes:

-B,b (for "black"): pixels with an even blue value are colored black, displaying the message in red letters on a black background.
-T,t (for "transparent"): pixels with an odd blue value are colored red, the other pixels remain the same so the message can be displayed on top of the original image.

**encode** *(coded: PIL.Image, img: PIL.Image) -> PIL.Image:*

Takes two images, a black image with a message in contrasting colors, and the image where the message will be encoded. The image where the message is going to be hidden in is first "flattened" (all pixels with an odd value on their blue component are changed so their blue component's value is even). Afterwards, the image that contains the message is processed, so the same pixels that contain the bright red letters are changed in the other image to pixels where the blue value is odd (harder to express in theory than practice). The image with the bright message has to be smaller or equal in size to the image where the message is going to be hidden in on either axis.

## Exceptions:

- StegonosaurusIncorrectFormatError: 

  Raised when a function receives a file that isn't a .PNG multiband image.
- StegonosaurusIncorrectSizeError: 

  Raised when the image with the coded message is larger than the image where the message will be hidden.
- StegonosaurusInvalidDecodeModeError (Ver. 1.1.3): 

  Raised when an invalid decode mode is provided.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Geada734/stegonosaurus",
    "name": "stegonosaurus",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "steganography",
    "author": "Geada734",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/62/03/acd3baacc55f81011f057f92ca74a5229c02b9a60e84dcea293bb2f983d6/stegonosaurus-1.2.3.tar.gz",
    "platform": null,
    "description": "# stegonosaurus\n\n*Ver 1.2.3*\n\nSteganography functions packed in a convenient wheel. This library helps encode and decode messages into and out of multi-band .png images. Works with the [Image](https://pillow.readthedocs.io/en/stable/reference/Image.html) module of the Pillow library.\n\n## Requirements\n- Python3\n\n## Installing\n\nA simple pip install will do:\n\n`pip install stegonosaurus`\n\n## Functions\n\n**inspect** *(img: PIL.Image) -> str:*\n\nReturns a string that contains the values of each pixel in the image along with other relevant info such as image size, format, file name, mode, and whether it can be used with the other functions in the library or not.\n\n**black** *(img: PIL.Image) -> PIL.Image:*\n\nReturn an all black copy of a provided image. This helps create a template for images with coded messages used for encoding.\n\n**decode** *(img: PIL.Image, mode: str) -> PIL.Image:*\n\nDecodes an image with a hidden message. This functions looks for pixels where the blue value is odd, and paints those pixels bright red. This function operates on two modes:\n\n-B,b (for \"black\"): pixels with an even blue value are colored black, displaying the message in red letters on a black background.\n-T,t (for \"transparent\"): pixels with an odd blue value are colored red, the other pixels remain the same so the message can be displayed on top of the original image.\n\n**encode** *(coded: PIL.Image, img: PIL.Image) -> PIL.Image:*\n\nTakes two images, a black image with a message in contrasting colors, and the image where the message will be encoded. The image where the message is going to be hidden in is first \"flattened\" (all pixels with an odd value on their blue component are changed so their blue component's value is even). Afterwards, the image that contains the message is processed, so the same pixels that contain the bright red letters are changed in the other image to pixels where the blue value is odd (harder to express in theory than practice). The image with the bright message has to be smaller or equal in size to the image where the message is going to be hidden in on either axis.\n\n## Exceptions:\n\n- StegonosaurusIncorrectFormatError: \n\n  Raised when a function receives a file that isn't a .PNG multiband image.\n- StegonosaurusIncorrectSizeError: \n\n  Raised when the image with the coded message is larger than the image where the message will be hidden.\n- StegonosaurusInvalidDecodeModeError (Ver. 1.1.3): \n\n  Raised when an invalid decode mode is provided.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Stegonography utilities",
    "version": "1.2.3",
    "project_urls": {
        "Homepage": "https://github.com/Geada734/stegonosaurus"
    },
    "split_keywords": [
        "steganography"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1dbb5880a42694ffbeb47e14d38b98c74aed0611cc9780d45c2e8df28b820b87",
                "md5": "b782b3ad6248837588139e2ba60b4765",
                "sha256": "ec6e9958008f86f1b42e00e06fca316b5fcde554d23995066d3ee692ec46facd"
            },
            "downloads": -1,
            "filename": "stegonosaurus-1.2.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b782b3ad6248837588139e2ba60b4765",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5430,
            "upload_time": "2023-06-05T23:25:37",
            "upload_time_iso_8601": "2023-06-05T23:25:37.077178Z",
            "url": "https://files.pythonhosted.org/packages/1d/bb/5880a42694ffbeb47e14d38b98c74aed0611cc9780d45c2e8df28b820b87/stegonosaurus-1.2.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6203acd3baacc55f81011f057f92ca74a5229c02b9a60e84dcea293bb2f983d6",
                "md5": "11982708149c564ae0d96bdba1cd03fc",
                "sha256": "eab7e054ae211237980c9a61758960c3683f73376e7c4bbdd7c867ed92ddab48"
            },
            "downloads": -1,
            "filename": "stegonosaurus-1.2.3.tar.gz",
            "has_sig": false,
            "md5_digest": "11982708149c564ae0d96bdba1cd03fc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7034,
            "upload_time": "2023-06-05T23:25:38",
            "upload_time_iso_8601": "2023-06-05T23:25:38.981638Z",
            "url": "https://files.pythonhosted.org/packages/62/03/acd3baacc55f81011f057f92ca74a5229c02b9a60e84dcea293bb2f983d6/stegonosaurus-1.2.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-05 23:25:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Geada734",
    "github_project": "stegonosaurus",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "stegonosaurus"
}
        
Elapsed time: 0.12459s