You are not logged in.

#1 2009-07-13 21:41:50

spixen
Member

[RESOLVED] problems with images in GRRLIB 4.0

problems with images in GRRLIB 4.0


when I add a picture and the test on my Wii the picture looks like this:

http://jonathan.familjenwase.se/aaa.png


what and how should I do to see the image on the screen

(sorry for my english)smile

Last edited by spixen (2009-07-13 22:23:15)

Offline

 

#2 2009-07-13 23:06:01

Crayon
Bad Mother Fucker

Re: [RESOLVED] problems with images in GRRLIB 4.0

Hi, could you paste the code you are using.

PS: Use the BBcode tag: code.

Offline

 

#3 2009-07-14 16:36:47

spixen
Member

Re: [RESOLVED] problems with images in GRRLIB 4.0

This is the code

main.c

Code:

#include "../../../GRRLIB/GRRLIB/GRRLIB.h"

#include <stdlib.h>
#include <wiiuse/wpad.h>


#include "gfx/pointer.h"
#include "gfx/button.h"
#include "gfx/button_1.h"

Mtx GXmodelView2D;


int main() {
    ir_t ir1;

    
    u32 wpaddown;

    GRRLIB_texImg tex_pointer = GRRLIB_LoadTexture(pointer);
    GRRLIB_texImg tex_button = GRRLIB_LoadTexture(button);
    GRRLIB_texImg tex_button1 = GRRLIB_LoadTexture(button1););

    GRRLIB_Init();
    WPAD_Init();
    WPAD_SetDataFormat(WPAD_CHAN_0, WPAD_FMT_BTNS_ACC_IR);

    while(1) {
        WPAD_SetVRes(0, 640, 480);
        WPAD_ScanPads();
        wpaddown = WPAD_ButtonsDown(0);
        WPAD_IR(WPAD_CHAN_0, &ir1);
        GRRLIB_FillScreen(0x000000FF);
        if(GRRLIB_PtInRect(150+20, 75+20, tex_button1.w-40, tex_button1.h-40, ir1.x+48, ir1.y+48)){
            GRRLIB_DrawImg(150, 75, tex_button, 0, 1, 1, 0xFFFFFFFF);
        }
        else{
            GRRLIB_DrawImg(150, 75, tex_button1, 0, 1, 1, 0xFFFFFFFF);
        }

        GRRLIB_DrawImg(ir1.x, ir1.y, tex_pointer, 0, 1, 1, 0xFFFFFFFF);
        GRRLIB_Render();

       if(wpaddown & WPAD_BUTTON_HOME) {
            exit(0);
        }
    }

    // Be a good boy, clear the memory allocated by GRRLIB
    GRRLIB_Exit(); 

    free(tex_button1.data);
    free(tex_button.data);

    free(tex_pointer.data);
    return 0;
}

button.c

Code:

/*
  This file was autogenerated from button.png
*/

//---------------------------------------------------------------------------------
#ifndef _button_h_
#define _button_h_
//---------------------------------------------------------------------------------
const unsigned char button[] = {
    0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52, 
    0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x4B, 0x08, 0x03, 0x00, 0x00, 0x00, 0xA5, 0x7F, 0x8E, 
    0x21, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xAE, 0xCE, 0x1C, 0xE9, 0x00, 0x00, 
    0x00, 0x04, 0x67, 0x41, 0x4D, 0x41, 0x00, 0x00, 0xB1, 0x8F, 0x0B, 0xFC, 0x61, 0x05, 0x00, 0x00, 
    0x00, 0x20, 0x63, 0x48, 0x52, 0x4D, 0x00, 0x00, 0x7A, 0x26, 0x00, 0x00, 0x80, 0x84, 0x00, 0x00, 
    0xFA, 0x00, 0x00, 0x00, 0x80, 0xE8, 0x00, 0x00, 0x75, 0x30, 0x00, 0x00, 0xEA, 0x60, 0x00, 0x00, 
    0x3A, 0x98, 0x00, 0x00, 0x17, 0x70, 0x9C, 0xBA, 0x51, 0x3C, 0x00, 0x00, 0x03, 0x00, 0x50, 0x4C, 
    0x54, 0x45, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x18, 0x18, 0x18, 0x20, 0x20, 
    0x20, 0x28, 0x28, 0x28, 0x30, 0x30, 0x30, 0x38, 0x38, 0x38, 0x40, 0x40, 0x40, 0x58, 0x58, 0x58, 
    0x60, 0x60, 0x60, 0x68, 0x68, 0x68, 0x70, 0x70, 0x70, 0x78, 0x78, 0x78, 0x7F, 0x7F, 0x7F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, 
    0xBB, 0xBB, 0xBB, 0xBF, 0xBF, 0xBF, 0xC7, 0xC7, 0xC7, 0xCF, 0xCF, 0xCF, 0xD7, 0xD7, 0xD7, 0xDF, 
    0xDF, 0xDF, 0xE7, 0xE7, 0xE7, 0xEF, 0xEF, 0xEF, 0xF7, 0xF7, 0xF7, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0xD8, 0x84, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x18, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6F, 
    0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, 0x50, 0x61, 0x69, 0x6E, 0x74, 0x2E, 0x4E, 0x45, 0x54, 
    0x20, 0x76, 0x33, 0x2E, 0x33, 0x36, 0xA9, 0xE7, 0xE2, 0x25, 0x00, 0x00, 0x03, 0x75, 0x49, 0x44, 
    0x41, 0x54, 0x68, 0x43, 0xED, 0x9A, 0x69, 0x57, 0xD3, 0x40, 0x14, 0x40, 0x5F, 0xD3, 0x96, 0xB6, 
    0xD0, 0x0A, 0x88, 0xD6, 0x1D, 0x77, 0x14, 0x54, 0xDC, 0xEB, 0x0E, 0x6E, 0xB8, 0x22, 0x56, 0xF2, 
    0xFF, 0xFF, 0x8B, 0xC9, 0x24, 0x4D, 0x66, 0x5E, 0x66, 0x79, 0x6F, 0x9E, 0x9E, 0xC2, 0x39, 0xDC, 
    0x2F, 0x34, 0xC9, 0x1B, 0xB8, 0x37, 0x69, 0xF9, 0xD2, 0x81, 0xF4, 0x48, 0x02, 0x47, 0xD2, 0x2A, 
    0x3D, 0xD1, 0xE2, 0x3C, 0x97, 0x63, 0x71, 0xB7, 0x0E, 0x4E, 0xF5, 0xFB, 0x30, 0x0F, 0x7A, 0xFD, 
    0xE1, 0x4F, 0xFD, 0x6E, 0xEA, 0x77, 0xEB, 0xA0, 0x37, 0x0F, 0xA3, 0xEA, 0x6F, 0xB6, 0x35, 0x31, 
    0x4D, 0x6B, 0xDC, 0x82, 0x64, 0x71, 0xE7, 0x34, 0x93, 0x35, 0x31, 0x67, 0x14, 0xC3, 0x0E, 0xC0, 
    0xE8, 0x70, 0x76, 0xC7, 0x6A, 0xAD, 0xEC, 0xE9, 0x2D, 0xAE, 0x8A, 0x61, 0x46, 0x65, 0xE3, 0x55, 
    0xD6, 0x08, 0xA0, 0xFB, 0xA7, 0xF4, 0xAA, 0xB4, 0xC6, 0x90, 0x2C, 0xAF, 0x88, 0x91, 0x65, 0x75, 
    0x61, 0x80, 0xB4, 0x0E, 0x5A, 0xB0, 0x2C, 0x47, 0x9A, 0xD5, 0x82, 0x49, 0xE1, 0x35, 0xBB, 0x5B, 
    0x3D, 0x58, 0x94, 0x5B, 0x89, 0x7F, 0xC3, 0x3A, 0x24, 0x53, 0x5D, 0x6B, 0x1F, 0xDA, 0xD2, 0xD2, 
    0x15, 0xB1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, 0x6E, 0x5F, 0xEA, 0x15, 0xA2, 0xBB, 0x1A, 0xC3, 0x5A, 0x4F, 0x89, 0x38, 
    0xF5, 0xFF, 0x4D, 0x17, 0xD6, 0x7A, 0x46, 0x83, 0x28, 0xEF, 0x19, 0xF3, 0x77, 0x61, 0xAD, 0xE7, 
    0x24, 0x68, 0xEE, 0xBE, 0xA9, 0x40, 0x17, 0xD6, 0x9A, 0x10, 0x20, 0x99, 0xFB, 0x87, 0x42, 0x5D, 
    0x58, 0xEB, 0x45, 0x04, 0x84, 0x12, 0x73, 0x24, 0xDC, 0x85, 0xB5, 0x5E, 0xB2, 0x89, 0xE8, 0xC0, 
    0x4B, 0x9A, 0x5D, 0x58, 0xEB, 0x15, 0x17, 0x76, 0x46, 0x63, 0x81, 0xAD, 0x0B, 0x6B, 0xBD, 0x66, 
    0xC2, 0xAD, 0x68, 0xCE, 0x5B, 0xBB, 0xB0, 0xD6, 0x1B, 0x19, 0xCC, 0xA8, 0x6C, 0xDC, 0xDE, 0x85, 
    0xB5, 0xDE, 0x8A, 0x90, 0x35, 0xE5, 0xAB, 0xCB, 0x2E, 0xAC, 0xF5, 0x4E, 0x80, 0xA8, 0xA8, 0x58, 
    0x3C, 0xEB, 0xC2, 0x5A, 0xBB, 0x33, 0x76, 0xD8, 0x08, 0x82, 0xCA, 0xA5, 0x75, 0x17, 0xD6, 0x7A, 
    0x5F, 0x52, 0xE9, 0x45, 0xBF, 0x60, 0x67, 0xED, 0x68, 0x5D, 0x58, 0xEB, 0x43, 0xC1, 0xCC, 0x2E, 
    0xFE, 0x67, 0x74, 0x8E, 0x5A, 0x68, 0x6A, 0xB5, 0xE1, 0xA3, 0xA2, 0x94, 0x13, 0xFC, 0x88, 0xEF, 
    0x51, 0x2B, 0xDB, 0xC6, 0xB7, 0x18, 0x3D, 0xF8, 0x64, 0xA3, 0x70, 0xE5, 0x20, 0x08, 0x52, 0x4B, 
    0x21, 0xD1, 0xBF, 0x8A, 0x1A, 0xC0, 0xF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, 0xEA, 0x22, 0x00, 0x00, 0x00, 0x00, 0x49, 
    0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82
};
const int button_size = 1831;
//---------------------------------------------------------------------------------
#endif //_button_h_
//---------------------------------------------------------------------------------

button.h

Code:

//---------------------------------------------------------------------------------
#ifndef _button_h_
#define _button_h_
//---------------------------------------------------------------------------------
extern const unsigned char button[];
extern const int button_size;
//---------------------------------------------------------------------------------
#endif //_button_h_
//---------------------------------------------------------------------------------

button_1.c

Code:

/*
  This file was autogenerated from button_1.png
*/

//---------------------------------------------------------------------------------
#ifndef _button_1_h_
#define _button_1_h_
//---------------------------------------------------------------------------------
const unsigned char button1[] = {
    0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52, 
    0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x4B, 0x08, 0x03, 0x00, 0x00, 0x00, 0xA5, 0x7F, 0x8E, 
    0x21, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xAE, 0xCE, 0x1C, 0xE9, 0x00, 0x00, 
    0x00, 0x04, 0x67, 0x41, 0x4D, 0x41, 0x00, 0x00, 0xB1, 0x8F, 0x0B, 0xFC, 0x61, 0x05, 0x00, 0x00, 
    0x00, 0x20, 0x63, 0x48, 0x52, 0x4D, 0x00, 0x00, 0x7A, 0x26, 0x00, 0x00, 0x80, 0x84, 0x00, 0x00, 
    0xFA, 0x00, 0x00, 0x00, 0x80, 0xE8, 0x00, 0x00, 0x75, 0x30, 0x00, 0x00, 0xEA, 0x60, 0x00, 0x00, 
    0x3A, 0x98, 0x00, 0x00, 0x17, 0x70, 0x9C, 0xBA, 0x51, 0x3C, 0x00, 0x00, 0x03, 0x00, 0x50, 0x4C, 
    0x54, 0x45, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x18, 0x18, 0x18, 0x20, 0x20, 
    0x20, 0x28, 0x28, 0x28, 0x30, 0x30, 0x30, 0x38, 0x38, 0x38, 0x40, 0x40, 0x40, 0x58, 0x58, 0x58, 
    0x60, 0x60, 0x60, 0x68, 0x68, 0x68, 0x70, 0x70, 0x70, 0x78, 0x78, 0x78, 0x7F, 0x7F, 0x7F, 0x80, 
    0x80, 0x80, 0x81, 0x81, 0x81, 0x82, 0x82, 0x82, 0x84, 0x84, 0x84, 0x85, 0x85, 0x85, 0x86, 0x86, 
    0x86, 0x87, 0x87, 0x87, 0x88, 0x88, 0x88, 0x89, 0x89, 0x89, 0x8A, 0x8A, 0x8A, 0x8C, 0x8C, 0x8C, 
    0x8D, 0x8D, 0x8D, 0x8E, 0x8E, 0x8E, 0x8F, 0x8F, 0x8F, 0x90, 0x90, 0x90, 0x91, 0x91, 0x91, 0x92, 
    0x92, 0x92, 0x94, 0x94, 0x94, 0x95, 0x95, 0x95, 0x96, 0x96, 0x96, 0x97, 0x97, 0x97, 0x98, 0x98, 
    0x98, 0x99, 0x99, 0x99, 0x9A, 0x9A, 0x9A, 0x9C, 0x9C, 0x9C, 0x9D, 0x9D, 0x9D, 0x9F, 0x9F, 0x9F, 
    0xA0, 0xA0, 0xA0, 0xA1, 0xA1, 0xA1, 0xA3, 0xA3, 0xA3, 0xA4, 0xA4, 0xA4, 0xA5, 0xA5, 0xA5, 0xA7, 
    0xA7, 0xA7, 0xA8, 0xA8, 0xA8, 0xAA, 0xAA, 0xAA, 0xAB, 0xAB, 0xAB, 0xAC, 0xAC, 0xAC, 0xAE, 0xAE, 
    0xAE, 0xAF, 0xAF, 0xAF, 0xB0, 0xB0, 0xB0, 0xB2, 0xB2, 0xB2, 0xB3, 0xB3, 0xB3, 0xB4, 0xB4, 0xB4, 
    0xB6, 0xB6, 0xB6, 0xB7, 0xB7, 0xB7, 0xB9, 0xB9, 0xB9, 0xBA, 0xBA, 0xBA, 0xBB, 0xBB, 0xBB, 0xBD, 
    0xBD, 0xBD, 0xBE, 0xBE, 0xBE, 0xBF, 0xBF, 0xBF, 0xC1, 0xC1, 0xC1, 0xC2, 0xC2, 0xC2, 0xC4, 0xC4, 
    0xC4, 0xC7, 0xC7, 0xC7, 0xCF, 0xCF, 0xCF, 0xD7, 0xD7, 0xD7, 0xDF, 0xDF, 0xDF, 0xE7, 0xE7, 0xE7, 
    0xEF, 0xEF, 0xEF, 0xF7, 0xF7, 0xF7, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0xCA, 0x26, 0xA7, 0xDA, 0x00, 0x00, 0x00, 0x18, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6F, 
    0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, 0x50, 0x61, 0x69, 0x6E, 0x74, 0x2E, 0x4E, 0x45, 0x54, 
    0x20, 0x76, 0x33, 0x2E, 0x33, 0x36, 0xA9, 0xE7, 0xE2, 0x25, 0x00, 0x00, 0x01, 0xDD, 0x49, 0x44, 
    0x41, 0x54, 0x68, 0x43, 0xED, 0xDA, 0xC9, 0x52, 0xC2, 0x40, 0x14, 0x85, 0xE1, 0x93, 0x84, 0x40, 
    0x82, 0xC1, 0x19, 0x47, 0x9C, 0xE7, 0x31, 0x4E, 0x38, 0x4F, 0x68, 0x14, 0xD1, 0xBC, 0xFF, 0xF3, 
    0x08, 0x06, 0xB0, 0x73, 0x5C, 0xB1, 0xB0, 0xFA, 0x58, 0xE5, 0xBF, 0x85, 0xAA, 0xFE, 0xEA, 0xA6, 
    0x77, 0x7D, 0x91, 0x4A, 0x06, 0x49, 0x55, 0xFA, 0xCF, 0x1A, 0xE4, 0xBB, 0xFC, 0x89, 0x69, 0x35, 
    0x87, 0x83, 0x00, 0x36, 0x2A, 0x05, 0x51, 0xC3, 0x9C, 0xA6, 0x39, 0xAD, 0x66, 0xC9, 0x86, 0xA8, 
    0x7F, 0xA6, 0x67, 0xC0, 0x0C, 0x56, 0xD5, 0x81, 0x5B, 0xAE, 0x27, 0x96, 0x8A, 0x0A, 0x40, 0xE5, 
    0xA3, 0x37, 0xB1, 0x6F, 0x56, 0xFB, 0xEB, 0x95, 0x2D, 0x91, 0xB2, 0x63, 0x2B, 0x80, 0xFF, 0xDE, 
    0x75, 0xF5, 0x59, 0x55, 0xB8, 0x56, 0x51, 0x9D, 0xC3, 0x7D, 0x84, 0xC4, 0x6A, 0x3A, 0xB0, 0xAE, 
    0x4A, 0x12, 0x07, 0x71, 0xE6, 0xEA, 0x4D, 0xAB, 0x64, 0xF9, 0x0B, 0x66, 0x33, 0xA9, 0xC1, 0x6D, 
    0x99, 0xAC, 0x17, 0x78, 0x02, 0xC3, 0x4A, 0x92, 0x00, 0x35, 0x93, 0x55, 0xC1, 0x90, 0x04, 0x2B, 
    0x46, 0x60, 0xB2, 0x02, 0x85, 0x9B, 0xD5, 0x19, 0x0C, 0x3C, 0x93, 0x55, 0x50, 0x61, 0xB9, 0xD9, 
    0x65, 0xEF, 0x5E, 0x79, 0xE0, 0x59, 0x23, 0x87, 0x58, 0x4F, 0x1A, 0x81, 0x58, 0x0D, 0x8D, 0x98, 
    0xF5, 0xA8, 0x11, 0xB3, 0x1E, 0x34, 0x62, 0xD6, 0xBD, 0x46, 0xCC, 0xBA, 0xD3, 0x88, 0x59, 0xB7, 
    0x1A, 0x31, 0xEB, 0x46, 0x23, 0x66, 0x5D, 0x6B, 0xC4, 0xAC, 0x2B, 0x8D, 0x98, 0x75, 0xA9, 0x11, 
    0xB3, 0x2E, 0x34, 0x62, 0xD6, 0xB9, 0x46, 0xCC, 0xAA, 0x6B, 0xC4, 0xAC, 0x33, 0x8D, 0x98, 0x75, 
    0xAA, 0x11, 0xB3, 0x4E, 0x34, 0x62, 0xD6, 0xB1, 0x46, 0xCC, 0x3A, 0xD2, 0x88, 0x59, 0xB1, 0x46, 
    0xCC, 0x3A, 0xD4, 0x88, 0x59, 0x07, 0x1A, 0x31, 0x6B, 0x5F, 0x23, 0x66, 0xED, 0x69, 0xC4, 0xAC, 
    0x5D, 0x8D, 0x98, 0xB5, 0xA3, 0x11, 0xB3, 0xB6, 0x35, 0x62, 0xD6, 0x96, 0x46, 0xCC, 0xDA, 0xD4, 
    0x88, 0x59, 0x1B, 0x1A, 0x31, 0x6B, 0x5D, 0x23, 0x66, 0xAD, 0x6A, 0xC4, 0xAC, 0x15, 0x8D, 0x98, 
    0xB5, 0xAC, 0x11, 0xB3, 0x96, 0x34, 0x62, 0xD6, 0xA2, 0x46, 0xCC, 0x5A, 0xD0, 0x88, 0x59, 0xF3, 
    0x1A, 0x31, 0x6B, 0x4E, 0x23, 0x66, 0xCD, 0x6A, 0xC4, 0xAC, 0x19, 0x8D, 0x98, 0x35, 0xAD, 0x51, 
    0x9E, 0xE5, 0x61, 0x4A, 0x23, 0x2F, 0xF7, 0x8A, 0x51, 0xC2, 0xA4, 0x46, 0x70, 0xCD, 0xA7, 0xA8, 
    0x10, 0xD5, 0x09, 0x89, 0x50, 0x34, 0x59, 0x31, 0x8A, 0xE3, 0x0A, 0x45, 0xA8, 0x98, 0xAC, 0x0F, 
    0x17, 0x6B, 0x63, 0x02, 0x01, 0xAF, 0xB9, 0x27, 0xF4, 0x1D, 0x38, 0xA3, 0xF6, 0x2B, 0x20, 0xCA, 
    0xBF, 0xEC, 0xA7, 0x21, 0x8A, 0x23, 0xB6, 0x0B, 0xE1, 0x77, 0xF7, 0x46, 0xFA, 0xEB, 0x19, 0x2D, 
    0x0F, 0x6E, 0x6C, 0x77, 0x5E, 0x3E, 0x9C, 0xEC, 0x13, 0x7E, 0xEF, 0x41, 0xA4, 0x69, 0xAB, 0xBD, 
    0xF8, 0x13, 0x5A, 0xBC, 0x5E, 0x9D, 0x5D, 0x96, 0x97, 0x9F, 0x3B, 0x36, 0x69, 0xDA, 0xDE, 0xFD, 
    0x01, 0xDA, 0x1B, 0x38, 0x16, 0xF2, 0x3B, 0x67, 0x46, 0xFD, 0xCD, 0x9F, 0xFC, 0x12, 0xDE, 0x5B, 
    0xF4, 0xF5, 0xB3, 0x95, 0x0A, 0x43, 0xE6, 0x02, 0xD7, 0x9F, 0xD8, 0x76, 0x1B, 0x64, 0x7D, 0xEF, 
    0x57, 0xFF, 0xFB, 0x3F, 0xAD, 0x41, 0xC6, 0x2B, 0x3A, 0xAD, 0x4F, 0xC0, 0x22, 0x46, 0x4A, 0x4A, 
    0xEE, 0xC3, 0x8B, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82
};
const int button_1_size = 1423;
//---------------------------------------------------------------------------------
#endif //_button_1_h_
//---------------------------------------------------------------------------------

button_1.h

Code:

//---------------------------------------------------------------------------------
#ifndef _button_1_h_
#define _button_1_h_
//---------------------------------------------------------------------------------
extern const unsigned char button1[];
extern const int button1_size;
//---------------------------------------------------------------------------------
#endif //_button_1_h_
//---------------------------------------------------------------------------------

Offline

 

#4 2009-07-14 16:40:53

NoNameNo
Administrator

Re: [RESOLVED] problems with images in GRRLIB 4.0

can you provide also a link to your png ?

Offline

 

#5 2009-07-14 16:46:24

spixen
Member

Re: [RESOLVED] problems with images in GRRLIB 4.0

Yes

button.png
http://jonathan.familjenwase.se/button.png

button_1.png
http://jonathan.familjenwase.se/button_1.png

Offline

 

#6 2009-07-14 17:06:29

Crayon
Bad Mother Fucker

Re: [RESOLVED] problems with images in GRRLIB 4.0

If that's the real size (150px × 75px). It's the reason why it's not working. Width and height needs to be a multiple of 4.

What software are you using to convert your images in in C array? Maybe you should consider using Wiibuilder, it gives warnings when the size is incorrect.

Offline

 

#7 2009-07-14 17:41:16

spixen
Member

Re: [RESOLVED] problems with images in GRRLIB 4.0

thanks:)

they worked:)

Offline

 

Board footer

Powered by FluxBB