Skip to content

GideonSerf/D2H

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

D2H

This is a simple tool to convert image, font and sound files into arrays for use with raylib. Only supports Linux/Windows and GCC/MSVC compilation for now.

Usage

d2h <Input file> <Output file> [Extension]

This will produce a file containing an array with the same name as the output file(therefore no spaces in output file names).

Example

d2h in.png out.h

This will produce the following in out.h:

const char* out_ext = ".png";

int out_size = N;

unsigned char out[] = {...};

Where N is the amount of bytes stored in the header.


To use this in your raylib project you would then do the following:

#include "out.h"

Image outImg = LoadImageFromMemory(out_ext, out, out_size);

About

Utility program to convert resource files into arrays for use with the Raylib library

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages