Skip to content
This repository was archived by the owner on Apr 16, 2024. It is now read-only.

mpewsey/pointillism

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pointillism

About

Create pointilized images using sprites or other sub images.

Installation

The development version of this package may be installed via pip:

pip install git+https://github.com/mpewsey/pointillism#egg=pointillism

Examples

The pointilize_1 function can be used to create a pointilized image from a base image. The following code was used to create the image of Charizard shown below. Each pixel of the original image has been replaced with a Pokemon whose dominant color corresponds with the color cluster in the original image.

# charizard.py
import random
import imageio
from pointillism import pointilize_1, sprite_paths

# Set the random seed for repeatable results
random.seed(12345)

# Get a list of sprite file paths
sprites = sprite_paths('pokemon')

# Load the base image
img = imageio.imread(sprites[5])

# Pointilize the base image with the sprites
img = pointilize_1(img, sprites, n=5)

# Write the result to file
imageio.imwrite('charizard.png', img)

charizard.png

About

Create pointilized images using sprites or other sub images.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages