RAW images to C code

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

Nov 19, 2009

RAW images to C code by diego_pmc at 8:03 PM (860 Views / 0 Likes) 2 replies

  1. diego_pmc
    OP

    Newcomer diego_pmc Advanced Member

    Joined:
    Sep 8, 2009
    Messages:
    52
    Country:
    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

    Member pembo GBAtemp Regular

    Joined:
    Jun 1, 2009
    Messages:
    105
    Country:
    United Kingdom
    don't bother converting it to raw, just run the png straight through raw2c.exe.
     
  3. giantpune

    Member giantpune GBAtemp Addict

    Joined:
    Apr 10, 2009
    Messages:
    2,860
    Country:
    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 $
     

Share This Page