Skip to main content

pyimager

a package for displaying images in console and creating/compressing them

Installation

Using pip

You can install pyimager via pip using

  • in a commandline:

  • py -m pip install pyimager
    

  • in a python script:

  • import os
    os.system('py -m pip install pyimager')
    

    Usage

    Creating an image

    If you don't want to create an image manually,
    i strongly recommend using pyimagers Designer Mode, that is updated often to fix any issues.

    Use it via a commandline the following:

    py -m pyimager
    

    OR use it via calling it within a Python script with:

    import os
    os.system('py -m pyimager')
    

    OR (also Python)

    import pyimager
    print("Loading Designer module...")
    d = pyimager.designer.Designer()
    d.run_designer()
    input("Finish designing...")
    

    For more help, the Designer mode offers a dedicated help page that is accessible using the !help command.

    Displaying an image

    Pyimagers images are saved in the ".lkim" file format.
    This means you can display any valid image with the newest version of pyimager if it has LKIM format.

    Display an image using either:

    import pyimager
    pyimager.display("C:/Path/To/Image.lkim")
    

    OR, if you already know the files content or generated it:

    import pyimager
    pyimager.display("display_content", "17#*#1#**#lkimcontentoffile")
    

    , where the width, height and colors are seperated by #*# seperators.

    Compressing an image

    The most compicated part is the compression.

    Decompressing

    You may use the following to decompress a LKIM file:

    import pyimager
    pyimager.decompress("C:/Path/To/Image.lkim", "C:/Path/To/Decompressed/Image.lkim")
    

    , but you may also leave the second path out and replace the image.

    Also, it is possible to temporarily decompress an image via reading its content and decompressing this:

    from pyimager import temp_uncompress
    data = "ImageDataWithoutSizeDescription"
    data = temp_uncompress(data, "$", 5)
    data = temp_uncompress(data, "%", 10)
    data = temp_uncompress(data, "&", 20)
    final_data = temp_uncompress(data, "§", 50)
    

    , which uncompresses all common compressing sign codecs known by pyimager.

    Compressing

    There are also compressing functions at pyimager.
    Therefore, you need to know that pyimagers compression bases on replacing frequent signs or strings with replacing signs.
    In order to do that, pyimager generates very large lists with possible combinations of signs.
    The currently largest list available is one with 6 signs long combinations.
    To not slow down your program, it is disabled by default.
    To include it, you can either set the includeComb6 arg to True the first time you use the compression or:

    import pyimager
    pyimager.compressing.addComb6()
    

    Then, you can compress an image using:

    import pyimager
    pyimager.compressing.compress("C:/Path/To/Your/Image.lkim", "C:/Path/To/File/You/Want/To/Save/New/Image.lkim")
    

    , where you, again, can replace the original file via not giving the second arg.
    This may take a while, especially with the comb6 list.

    Finally, you can recompress a compressed image using pyimager.compressor("C:/Path/To/Image.lkim", "C:/New/Image.lkim").

    More functions

    about

    The pyimager.about() function returns information about your release.

    pyimager.data

    This is the submodule for pyimagers data.
    You probably won't be able to use it if you aren't developing another pyimager module.

    pyimager.utils

    This submodule has two functions for creating lists with all combinations from other lists.
    pyimager.utils.listComb combines the lists,
    pyimager.utils.countDif counts the number of different characters in two strings.

    pyimager.message

    Functions for colored error messages etc..
    pyimager.message.errorMessage sends a message with a customizable color
    pyimager.message.errorMessageB sends a message with a customizable background color.

    More coming soon...

    Release files for pyimager 3.4.8

    For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

    Source distribution (sdist)

    Source distribution for pyimager 3.4.8
    File Size Uploaded
    pyimager-3.4.8.tar.gz 9.6 kB Details

    Built distribution (wheel)

    Table of built distributions (wheels) for pyimager 3.4.8
    File Interpreter ABI Platform
    pyimager-3.4.8-py3-none-any.whl Python 3 none any Details

    Total release size:19.6 kB

    Release files / pyimager-3.4.8.tar.gz

    Download URL pyimager-3.4.8.tar.gz
    Size 9.6 kB
    Tags Source
    SHA-256 checksum
    How to use checksums
    5602ea29d513d85e1a561923127a1adcabedd0ba1064cf1e9884dd0656508c83
    BLAKE2b-256 checksum
    How to use checksums
    31b0a8e66bc6f0c46fea740f8160e0797c52e398b3613420f1bd050de4f0d481
    Upload date
    Uploaded using Trusted Publishing?
    What is trusted publishing?
    No
    Uploaded via twine/4.0.0 CPython/3.11.0

    Release files / pyimager-3.4.8-py3-none-any.whl

    Download URL pyimager-3.4.8-py3-none-any.whl
    Size 9.9 kB
    Tags Python 3
    SHA-256 checksum
    How to use checksums
    c92b5264957473fe1a2faf049feda15031beefbb70e6ad47f028e84f14f115be
    BLAKE2b-256 checksum
    How to use checksums
    26af6744174593008ed42b134f286923d0b40265dc934011acd89892b98ed2c1
    Upload date
    Uploaded using Trusted Publishing?
    What is trusted publishing?
    No
    Uploaded via twine/4.0.0 CPython/3.11.0

    Release history Release notifications | RSS feed

    This release

    3.4.8 This release

    2 release files

    3.4.7

    2 release files

    3.4.6

    2 release files

    3.4.5

    2 release files

    3.4.4

    2 release files

    3.4.3

    2 release files

    3.4.2

    2 release files

    3.4.1

    2 release files

    3.4.0

    2 release files

    3.3.13

    2 release files

    3.3.12

    2 release files

    3.3.11

    2 release files

    3.3.10

    2 release files

    3.3.9

    2 release files

    3.3.8

    2 release files

    3.3.7

    2 release files

    3.3.6

    2 release files

    3.3.5

    2 release files

    3.3.4

    2 release files

    3.3.3

    2 release files

    3.3.2

    2 release files

    3.3.1

    2 release files

    3.3.0

    2 release files

    3.2.1

    2 release files

    3.2.0

    2 release files

    3.1.0

    2 release files

    3.0.3

    2 release files

    3.0.2

    2 release files

    3.0.1

    2 release files

    3.0.0

    2 release files

    2.0.2

    2 release files

    2.0.1

    2 release files

    2.0.0

    2 release files

    1.2.2

    2 release files

    1.2.1

    2 release files

    1.2.0

    2 release files

    1.1.3

    2 release files

    1.1.2

    2 release files

    1.1.1

    2 release files

    1.1.0

    2 release files

    1.0.0

    2 release files

    Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page