JoyPixels Labs

version 8.0

.unicodeToImage(str)

convert native unicode emoji directly to images

If you have native unicode emoji characters that you want to convert directly to images, you can use this function. It should be noted that once your input text has been converted to images it cannot be converted back using the provided functions.

For that reason, we recommend only converting input text to images when it's ready to display to the client. The better alternative, in our opinion, is to convert native unicode emoji to their corresponding shortname using .toShort(str) for database storage.

Feel free to enter native unicode emoji in the input below to test the conversion process.

Input:

Output:

JS Snippet:

    // <input type="button" value="Convert" onclick="convert()"/>

    <script type="text/javascript">
    function convert() {
        var input = document.getElementById('inputText').value;
        var output = joypixels.unicodeToImage(input);
        document.getElementById('outputText').innerHTML = output;
      }
    </script>