Skip to main content

Generate white potato shaped blobs on black backgrounds

Project description

Blob Masks

PyPI version License: WTFPL

Blob Masks is a Python package that allows you to generate white, potato-shaped blobs on a black background. It's perfect for creating random mask patterns, image placeholders, or unique artistic effects.

Installation

Install the package using pip:

pip install blob-masks

Usage

Here's a basic example of how to use the blob-masks package:

from blob_masks import blob_mask

# Generate a blob mask with default parameters
mask = blob_mask()

# Save the generated mask as an image
mask.save("blob.png")

You can customize the generated blobs by specifying additional parameters:

from blob_masks import blob_mask

# Generate a blob mask with custom parameters
number_seed_blob = generate_blob(seed=42)
text_seed_blob = generate_blob(seed="Magnus", size=256)

You can also obtain the borders of the blob.

from blob_masks import blob_mask, borders_of_blob

blob = blob_mask()
borders = borders_of_blob(blob, border_width=10)

Parameters

Parameters

blob_mask:

  • seed: Seed of the blob, either a string or an integer (default: Random)
  • size: Height and width of the output image in pixels (default: 512)

borders_of_blob:

  • blob: The blob to get the borders of
  • border_width: Width of the border in pixels (default: 20)

License

This project is licensed under the WTFPL License - 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

blob-masks-0.1.3.tar.gz (4.7 kB view details)

Uploaded Source

File details

Details for the file blob-masks-0.1.3.tar.gz.

File metadata

  • Download URL: blob-masks-0.1.3.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for blob-masks-0.1.3.tar.gz
Algorithm Hash digest
SHA256 e4d071cb252f58ebe20f5dd61d88301268f8ef21e0018c1531a8357aa3f4d05b
MD5 b13f75a4fa5ed3022656e85b633d8900
BLAKE2b-256 e9710316a671a47a57b80556bfabf355b3c27cc94850234d4bd6e076a068089c

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