Skip to main content
GameDev.net gamedev.net
🔒 Locked

Hardcoded logo

Started by Austrian Coder May 1, 2004 at 7:09 PM 4 replies 600+ views
Original Post
Austrian Coder
Austrian Coder
Hi guys. I have here a nince logo for my simple SDK. Now i want to make it hardcoden, something like: unsigned char Logo_bmp[] = {.... But how do i get the data from an jpg into an unsigned char [] to use it directly in my SDK? Thanks, Christian
OrangyTang
OrangyTang
If you don''t want to code something yourself, theres loads of utilities for GBA programming that will do exactly that. Even though they''re intended for GBA code, they basically just output a C file with the raw data in it.

Try Gfx2Gba from http://www.devrs.com/gba/software.php for a start, theres others out there that might be more suitable though.
RuneLancer
RuneLancer
You could include it as a resource. When you compile your project, it''ll be embedded in the executable.
MaulingMonkey
MaulingMonkey
Also, I believe The GIMP (gimp.org) has the option of saving to a ''.c format'' file. It then prompts you for a variable name, and volia, it exports it to C code, just the raw bytecodes if I remember.

Of course, this will mean you''ll have to manually set the width/height variables of the image...

-Mike
Austrian Coder
Austrian Coder
@RuneLancer: I dont want to include it as resoucre - should later compil with many compilers on win and linux.

@MaulingMonkey: Oh Gimp - i will try it also. width/height is no problem.

[edited by - Austrian Coder on May 2, 2004 7:36:36 AM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.