Skip to content

ZZYZX/png2argb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

png2argb

A tool to convert PNG image data into Xlib-compatible cardinal ARGB buffer.
It basically lets you embed raw image resources into your X11 programs.
Can be used as the data parameter to XChangeProperty(). See the example program for reference.

Dependencies

Requires libpng-dev to compile, libpng to work.

Installation

make clean all
sudo make install

Example usage

png2argb image16.png image32.png > buffer.h

Output

unsigned long buffer[] = {
    16, 16,
    0, 0, 0, 0, [...],

    32, 32,
    0, 0, 0, 0, 0, 0, 0, 0, [...],
};

About

A simple tool for constructing XLib-compatible cardinal ARGB buffers from PNG images.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published