RAW images to C code

Discussion in 'Wii - Emulation and Homebrew' started by diego_pmc, Nov 19, 2009.

  1. diego_pmc

    diego_pmc Advanced Member

    Sep 8, 2009
    United States
    I am trying to convert a PNG image of Lucida Console font (here it is) to a C source file, using raw2c. I have no problems converting it, but the size of the C source code is quite large. I produce the font PNG image by using WiiBuilder and I have tried making PNGs with smaller font sizes, but the filesize of the C source is always a few hundred KB.

    As a comparison, the C source that Uffe Flarup used in his game, Sand Traps, is only 25 KB and it is also produced using raw2c; if however I convert his font from PNG to RAW (with Photoshop) and then use raw2c to make the C file, I will get a file that's about 800 KB.

    How can I reduce the size of my C source?
  2. pembo

    pembo GBAtemp Regular

    Jun 1, 2009
    don't bother converting it to raw, just run the png straight through raw2c.exe.
  3. giantpune

    giantpune GBAtemp Addict

    Apr 10, 2009
    United States
    are you just trying to use it in your wii app? if so just put the bin2o stuff in your makefile.

    CODE%.png.o : %.png
    ÂÂÂÂ@echo $(notdir $