identicon alternatives and similar packages
Based on the "Graphics" category.
Alternatively, view identicon alternatives based on common mentions on social networks and blogs.
-
Gifcurry
😎 The open-source, Haskell-built video editor for GIF makers. -
reanimate
Haskell library for building declarative animations based on SVG graphics -
implicit
A math-inspired CAD program in haskell. CSG, bevels, and shells; 2D & 3D geometry; 2D gcode generation... -
threepenny-gui
GUI framework that uses the web browser as a display. -
diagrams
Embedded domain-specific language for declarative vector graphics (wrapper package) -
GPipe
Core library of new GPipe, encapsulating OpenGl and providing a type safe minimal library -
luminance
Type-safe, type-level and stateless Haskell graphics framework -
log-warper
Logging library to provide more convenient, extremely configurable but simple monadic interface with pretty output -
unm-hip
The University of New Mexico's Haskell Image Processing Library -
timeplot
Analyst's swiss army knife for visualizing data from ad-hoc log files -
processing-for-haskell
Graphics for kids and artists. Processing implemented in Haskell -
GLUtil
Utility functions for working with OpenGL BufferObjects, GLSL shaders, and textures. -
graphics-drawingcombinators
Combinators for drawing 2D shapes and images in Haskell (using OpenGL)
ONLYOFFICE Docs — document collaboration in your environment
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of identicon or a related project?
README
Identicon
The package implements a flexible framework for identicons generation on top of the Juicy Pixels package.
Quick start
To use the package you usually need the following set of imports (and a couple of language extensions for the type level magic):
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
import Codec.Picture -- JuicyPixels
import Data.ByteString (ByteString) -- we use strict byte strings
import Data.Proxy
import Data.Word (Word8)
import Graphics.Identicon -- core definitions
import Graphics.Identicon.Primitive -- some visual primitives
You first write a type that holds information about total number of bytes your identicon consumes and number of distinct visual components it has (they are called “layers” in the terminology of the package):
type MyIcon = Identicon 12 :+ Consumer 4 :+ Consumer 4 :+ Consumer 4
Here we have an identicon that needs 12 bytes to be generated. It has three consumers that take 4 bytes each and generate layers, i.e. visual objects (circles, squares, etc.).
The second step is to write implementation of every layer. We can use the
primitives available out-of-the-box, they live in the
Graphics.Identicon.Primitive
module:
myImpl :: Implementation MyIcon
myImpl = Identicon :+ a :+ a :+ a
where
a :: Word8 -> Word8 -> Word8 -> Word8 -> Layer
a r g b n =
rsym $ onGrid 3 3 n $
gradientXY (edge . mid) black (PixelRGB8 r g b)
We could choose to code every layer differently, but since position and color of every layer are unlikely to be the same, this approach will work well too.
Every byte is available to the layer-generating function as a distinct
Word8
argument. The type system makes sure that:
you consume exactly as many bytes as you promised in type of your identicon;
you have as many layers as you described in type of your identicon;
every function in your implementation has a correct signature (i.e. it grabs as many
Word8
s as promised and produces aLayer
in the end).
Mixing of layers and generation is handled by the library like this:
-- | Here is the function that generates your identicons. It's usually
-- convenient to wrap the 'renderIdenticon' function that comes with the
-- library.
genMyIdenticon ::
-- | Identicon width
Int ->
-- | Identicon height
Int ->
-- | Input (some sort of hash or something)
ByteString ->
-- | Identicon, unless 'ByteString' is too short
Maybe (Image PixelRGB8)
genMyIdenticon = renderIdenticon (Proxy :: Proxy MyIcon) myImpl
For more information head straight to the Haddocks. BTW, I have written a blog post about the package where I demonstrate some pictures generated with it.
Related packages
The following packages are designed to be used with identicon
:
Contribution
Issues, bugs, and questions may be reported in the GitHub issue tracker for this project.
Pull requests are also welcome.
License
Copyright © 2016–present Mark Karpov
Distributed under BSD 3 clause license.
*Note that all licence references and agreements mentioned in the identicon README section above
are relevant to that project's source code only.