Displaying images (JPEGs)

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

  1. diego_pmc
    OP

    diego_pmc Advanced Member

    Newcomer
    52
    0
    Sep 8, 2009
    United States
    I've been trying to figure this out for quite some time, but I always got to a dead end. I tried using the method described at the CodeMii tutorial, but it's not a very nice way to do it; I've tried using several third-party libraries, including GRRLIB, but this one's not good for me either. Images are very easy to display with GRRLIB, but I also have a lot of text in my game, and it's very hard to work with text (the way I need it) in GRRLIB.

    So my question is, what is the optimal way to display images, keeping in mind that these are my requirements:
    • If it's a library it must not be in conflict wih 'printf' (GRRLIB, for example, is);
    • I need to be able to specify its position (this will probably not be a problem [​IMG]);
    • I need to be able to stretch the image on the whole screen;
    • I need to be able to remove the image;
    • I need to be able to print text over the image.
    So can anyone help me with a recommendation, and perhaps a template? (libjpeg maybe?)
     
  2. pembo

    pembo GBAtemp Regular

    Member
    105
    0
    Jun 1, 2009
    where tex_font is the image file containing the font.
     
  3. diego_pmc
    OP

    diego_pmc Advanced Member

    Newcomer
    52
    0
    Sep 8, 2009
    United States
    GRRLIB is the first thing I've tried, but it is not very good at doing what I need in terms of text. When I call GRRLIB_Render(), the library renders everything I've told it to render until that point, then if I try to add something to the screen I have to call GRRLIB_Render() again, which will remove what's already present on the screen — this makes GRRLIB not the best choice for me.
     
  4. pembo

    pembo GBAtemp Regular

    Member
    105
    0
    Jun 1, 2009
    you really have to run GRRLib in a loop where each iteration you draw the images, the text, etc, then call render when you want to show these to the screen.
    Just put the render at the end of the loop once only.

    Almost all graphical libraries work in a similar way.
     
  5. giantpune

    giantpune GBAtemp Addict

    Member
    2,860
    122
    Apr 10, 2009
    United States
    look at any of wanin's apps or even cfg loader. there really isnt a library that uses a console and shows images. why do you want to keep the console so bad? being able to show text in any font is better than being stuck with the same small, ugly font. check the source for my brawl+updatifier. i made a console in libwiigui

    it doesnt act exactly like the traditional one, but it can be changed around however you like it.