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 async (>=2.0.2), base (>=4.7 && <5), bytestring (>=0.10.6.0), cli (>=0.1.2), JuicyPixels (>=3.2.7), pixelated-avatar-generator, pureMD5 (>=2.1.0.0), random (>=1.0.0.2), 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-08-13T14:38:32Z
Distributions
Executables pixelated-avatar-generator
Downloads 2628 total (10 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-08-13 [all 1 reports]

Readme for pixelated-avatar-generator-0.1.3

[back to package description]

Pixelated Avatar Generator Travis CI Status Coverage Status Hackage pixelated-avatar-generator on Stackage Nightly

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

Some examples of avatars generated by the library.

Library

Pixelated Avatar Generator is a library which provides functions and data types for generating, altering, and saving pixelated avatars.

For information on how to use the library, see the documentation for the Graphics.Avatars.Pixelated module.

Documentation

The documentation for the latest release of the library can be found in the library's Hackage entry.

Documentation of the development versions of the library can be generated by running the following command in the main directory of the project:

$ stack haddock

The generated html documentation can then be found in the following directory:

.stack-work/dist/x86_64-linux/Cabal-1.22.5.0/doc

Executable

An executable program for generating avatar image files is also provided. It can generate several avatar images concurrently to given file locations.

The executable can be installed along with the library by running the following command:

$ stack install pixelated-avatar-generator

The executable can then by run by calling it with the desired filepath(s) of the output file(s) including the .png extension.

$ pixelated-avatar-generator image1.png image2.png
Successfully created 2 avatars.

By default, the avatars are at a size of 256x256px. Though the size can be changed by using a custom scaling factor via the --scaling-factor flag.

Usage

Usage: pixelated-avatar-generator FILEPATH_1 [FILEPATH_2] [FILEPATH_3] ...

FILEPATH_(1...)   -- The locations to save generated avatars at. "img/test.png"

Options:

     --scaling-factor
         Use a custom scaling factor. The scaling factor is multiplied by 8 to
         get the dimensions of the image. For example, a scaling factor of 4
         would yield a 32x32px image. The default scaling factor is 32.

License

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