Skip to main content

Convert any image to image that conforms with hexagon stickers standard.

Project description

hexsticker
----------

Produce hexagon stickers automatically from an image in compliance with the `Stickers Standard <https://sticker.how/>`_.


Installation
============

.. code-block:: console

pipinstallhexstickerAftertheinstallationsteplistedabove,youwillbeabletousethehexstickercommand:..codeblock::console hexsticker --help


Requirements
============

* Python 3.6+


Examples
========

Let's create a hexagon sticker for the `Selinon project <https://github.com/selinon>`_.

Here is the input image:

.. figure:: https://raw.githubusercontent.com/fridex/hexsticker/master/fig/input/selinon.png
:alt: Selinon input logo
:align: center

Let's create a hexagon sticker:

.. code-block:: console

hexstickerselinon.pngoselinonsticker1.pngINFO:hexsticker.create:Writingoutputtoselinonsticker1.pngTheresultingimageis:..figure::https://raw.githubusercontent.com/fridex/hexsticker/master/fig/output/selinonsticker1.png:alt:Selinonhexagonstickersticker1:align:center:scale:50Ascanbeseenabove,therearesomepartscutoffletsaddsomepaddingtotheimage:..codeblock::console hexsticker input/selinon.png -o output/selinon-sticker-2.png --padding-size 25
INFO:hexsticker.create:Writing output to 'selinon-sticker-2.png'


.. figure:: https://raw.githubusercontent.com/fridex/hexsticker/master/fig/output/selinon-sticker-2.png
:alt: Selinon hexagon sticker sticker 2
:align: center
:scale: 50%


The padded part is white by default - that's why there are missing spikes of hexagon. Let's set color of padded area to the same color as background color of the original image:

.. code-block:: console

You can't use 'macro parameter character #' in math mode hexsticker input/selinon.png -o output/selinon-sticker-4.png --padding-size 25 --padding-color '#66cfa7' --border-size 35
INFO:hexsticker.create:Writing output to 'selinon-sticker-4.png'


.. figure:: https://raw.githubusercontent.com/fridex/hexsticker/master/fig/output/selinon-sticker-4.png
:alt: Selinon hexagon sticker sticker 4
:align: center
:scale: 50%

Ehm, the default black one does not look that good in this case. Let's try some color that fits color scheme:

.. code-block:: console

You can't use 'macro parameter character #' in math mode git clone https://github.com/fridex/hexsticker # or use ssh
cdhexsticker pip3 install -r requirements.txt --user
exportPYTHONPATH=. ./hexsticker-cli --help



Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page