png2c

command module
v0.0.0-...-a1b6593 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2018 License: EUPL-1.2 Imports: 9 Imported by: 0

README

png2c

A simple tool for converting PNG images to a C definition.

Usage

Download and install the library and tools using:

go get github.com/silkeh/png2c

To convert an image, use it as follows:

png2c -file pixel.png -var pixel -mode 565 -brief Pixel

Which will result in something like:

/**
 * @brief   Pixel (1x1)
 */
const uint16_t pixel[1][1] = {
    { 0xe005 }
};

Note that no compensation for the alpha channel is done when the alpha channel is not represented in the output format.

Documentation

Overview

png2c is a simple tool for converting PNG images to a C definition.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL