Skip to main content

An Open Source Python library for creating photomosaics

Project description

PytoMosaic

PytoMosaic is a Python library for creating photomosaics from images using a set of source images. It supports common image formats and provides a simple API with optional verbose progress output.


Features

  • Create photomosaics from images
  • Supports .jpg, .jpeg, .png, .gif, .bmp, .tiff, .tif formats
  • Optional verbose mode with progress bars using tqdm
  • Easy-to-use Python API
  • Compatible with Python 3.10+

Installation

Install PytoMosaic from PyPI:

pip install pytomosaic

Dependencies:

  • numpy
  • Pillow
  • tqdm

These will be installed automatically.


Usage

from pytomosaic import createMosaic

imgPath = "target.jpg"
sourceImages = "source_folder"
cropSize = 50 # Size of mosaic parts in px

# Generate mosaic with verbose progress
mosaic = createMosaic(imgPath, sourceImages, cropSize, verbose=True)
mosaic.show()

Set verbose=False or leave empty to disable prints and progress bars.


Supported Image Extensions

VALID_EXTENSIONS = {
    ".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tiff", ".tif"
}

Files with unsupported extensions are skipped and optionally warned about in verbose mode.


License

PytoMosaic is licensed under the GNU GPL v3. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytomosaic-0.1.2.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytomosaic-0.1.2-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file pytomosaic-0.1.2.tar.gz.

File metadata

  • Download URL: pytomosaic-0.1.2.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pytomosaic-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0cfed278a43477fe0349cdbcb7c226bd4757abc86d88f841548417c85864a615
MD5 f31df843c74b4d0222ad4182413c2ee3
BLAKE2b-256 30c24d0200fedfbe3d3a84a4bc824f725f5d414804d3d041dbbbeb04b5a5e52e

See more details on using hashes here.

File details

Details for the file pytomosaic-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pytomosaic-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pytomosaic-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 35f810915c1f799ee3a2152a35d36e149fab478e9acc06a11383b588469b8a5c
MD5 b55ff076f055705645082d5179c3bc91
BLAKE2b-256 d3835a2862d2b492f23ac8fe7b6c2c4331f244dc6343f5057e724a0c86a39221

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page