pixelated-avatar-generator: A library and application for generating pixelated avatars.

[ graphics, image, library, mit, program ] [ Propose Tags ]

Pixelated Avatar Generator is a library and application for generating pixelated avatar images from seed strings.


[Skip to Readme]

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0, 0.1.1, 0.1.2, 0.1.3
Change log CHANGELOG.md
Dependencies base (>=4.7 && <5), bytestring (>=0.10.6.0), JuicyPixels (>=3.2.7), pixelated-avatar-generator, pureMD5 (>=2.1.0.0), split (>=0.2.3.0) [details]
License MIT
Copyright 2016 Christopher Wells
Author Christopher Wells
Maintainer cwellsny@nycap.rr.com
Category Image, Graphics
Home page https://github.com/ExcaliburZero/pixelated-avatar-generator
Bug tracker https://github.com/ExcaliburZero/pixelated-avatar-generator/issues
Source repo head: git clone https://github.com/ExcaliburZero/pixelated-avatar-generator
Uploaded by ExcaliburZero at 2016-07-12T21:12:14Z
Distributions
Executables pixelated-avatar-generator
Downloads 2629 total (11 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2016-07-12 [all 1 reports]

Readme for pixelated-avatar-generator-0.1.0

[back to package description]

Pixelated Avatar Generator Travis CI Status Coverage Status

Pixelated Avatar Generator is a Haskell library and application for generating pixelated avatar images from seed values.

import Graphics.Avatars.Pixelated

createAndSaveAvatar :: String -> FilePath -> IO ()
createAndSaveAvatar s path = saveAvatar avatar path
  where avatar = scaleAvatar 32 $ generateAvatar seed
        seed   = createSeed s

An example of an avatar generated by the library.

Executable

An example executable program that uses the library is also provided. It creates an avatar from a given seed string and saves the created .png image to a given file location.

The executable can be compiled by running the following command:

$ stack build

The executable can then by run by running it with stack exec and providing it the desired filepath of the output file including the .png extension and a random seed string.

$ stack exec pixelated-avatar-generator image.png "Hello, World"
Creating avatar at image.png
Grey
█ ████ █
        
  ████  
█  ██  █
████████
█ █  █ █
█      █
████████
Successfully created avatar, and saved it to image.png

Usage

Usage: pixelated-avatar-generator FILEPATH SEEDSTRING

FILEPATH   -- The location to save the generated avatar at. "img/test.png"
SEEDSTRING -- The string to use to generate the avatar. "Hello"

License

The source code of Pixelated Avatar Generator is available under the MIT license, see LICENSE for more information.