No commit activity in last 3 years
No release in over 3 years
Adds the convert method to Emojidex::Collection and Emojidex::Emoji, which\ allows you to convert an emoji collection or a single emoji to the specified\ image format.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.15, ~> 1.15.9
~> 0.5, ~> 0.5.1
~> 1.8, ~> 1.8.0
~> 1.2, ~> 1.2.7
~> 3.2, ~> 3.2.0
~> 2.16
~> 3.1, ~> 3.1.6
 Project Readme

Build Status Emojidex Converter

A set of tools for converting emoji arrays to and from vectors [SVG] and rasters [PNG].

This tool is primarily for internal use. You can find converted assets here:

or on-line from the asset repository or CDN, see documentation here

Requirements

Uses Phantom SVG, which in turn uses rapngasm.
rapngasm requires libapngasm to build, see instructions here.

Usage

Instantiation: The default destination will be your local emojidex cache (set with environment variable $EMOJI_CACHE, defaults to $HOME/.emojidex/cache) or the current directory if $EMOJI_CACHE is not set.

  • You can specify the destination manually with an options hash key of :destination.
  • You can sepcify your own sizes using a :sizes hash. The keys to the hash become the directory names.
converter = Emojidex::Converter.new(destination: "/output/destination/file/path", sizes: {super_huge: 2000, px12: 12})
  
# Sizes and output destination can be changed after initialization:  
converter.destination = '/new/destination'
converter.sizes = {superTiny: 3, '720p': 720}

Pre-process SVG frames into animated SVGs: Used to compile folders with SVG frames and animation.json files into single key-framed SVG files. The pre-processor should be run on every collection directory with sub-directories containing SVG animation sources before rasterization.

converter.preprocess('/path/to/collection')

Convert an array of emoji with vector sources to rasters: The emoji array is an array of Emojidex::Emoji objects.

converter.rasterize(emoji_array, '/directory/with/SVG/sources')

Convert an Emojidex::Collection: Emojidex::Collection objects contain references to their source directories so you only need to pass the collection object.

converer.convert_collection(collection)

Contributing

Fork, edit, commit, push, pull request!
emojidex-converter is a very primitivate, fairly single-purpose tool. If you can think of any features that could extend its functionality we'd love to see it!

License

emojidex and emojidex tools are licensed under the emojidex Open License.

©2013 the emojidex project / Genshin Souzou K.K. [Phantom Creation Inc.]