Images

Creations

strangenikolai

NEW 5 years ago

Sorunome Sorunome

Do you know what the upper size of the bitmap can be? If I make it really small it works, but over a certain size it just shows as a black box. I haven't quite narrowed down the size that breaks.

Sorunome

5 years ago

well, bmp images are loaded into ram, so you need at least enough ram

Sorunome

NEW 5 years ago

strangenikolai strangenikolai

well, bmp images are loaded into ram, so you need at least enough ram

Mokona

NEW 5 years ago

Hello,

it seems that in the XLS file in the GamebuinoPalette.zip file describing the colors, PINK (from the source) is called MAGENTA.


Aurélien Rodot

5 years ago

Thanks, I'll fix that :)

Aurélien Rodot

NEW 5 years ago

Mokona Mokona

Thanks, I'll fix that :)

Adamko

NEW 5 years ago

Bonjour , j'ai une image bitmap mais je sais pas comment la mettre dans le programme.

Sorunome

5 years ago

The section "Flash Image" explains how to do that. If you are still confused, would you please mind saying more specifically where you are stuck?

Sorunome

NEW 5 years ago

Adamko Adamko

The section "Flash Image" explains how to do that. If you are still confused, would you please mind saying more specifically where you are stuck?

Adamko

5 years ago

comment savoir si on a une image uint8_t ou uint16_t?

Adamko

NEW 5 years ago

Sorunome Sorunome

comment savoir si on a une image uint8_t ou uint16_t?

Sorunome

5 years ago

In the conversion tool linked. if you specified "indexed" it'll be uint8_t, else it'll be uint16_t.

Sorunome

NEW 5 years ago

Adamko Adamko

In the conversion tool linked. if you specified "indexed" it'll be uint8_t, else it'll be uint16_t.

Adamko

5 years ago

ca change quoi?

Adamko

NEW 5 years ago

Sorunome Sorunome

ca change quoi?

Sorunome

5 years ago

Indexed images use a palette, by default the gamebuino palette. They are smaller in size.

RGB565 images are basically full color.

Sorunome

NEW 5 years ago

Adamko Adamko

Indexed images use a palette, by default the gamebuino palette. They are smaller in size.

RGB565 images are basically full color.

Adamko

5 years ago

l'ide me dit qu'il y a une erreur de compilation.

Adamko

5 years ago

c moi dit:

# include <Gamebuino-Meta.h> 

const uint8_t myImgBuf [] = { 
   8, 8, // largeur, hauteur 
  1, 0, // frames 
  0, // boucle d'image 
  0xFF, // couleur transparente 
  1, // Mode couleur 

  0x07, 0x07, 0x07, 0x07, 
   0x70, 0x70, 0x70, 0x70, 
   0x07, 0x07, 0x07, 0x07, 
   0x70, 0x70, 0x70, 0x70, 
   0x07, 0x07, 0x07, 0x07, 
   0x70, 0x70, 0x70, 0x70, 
   0x07, 0x07, 0x07, 0x07, 
   0x70, 0x70, 0x70, 0x70, 


Image myImg (myImgBuf); sur cette ligne ca me dit "expected ',' or ';' before 'Image'"

void setup () { 
  gb.begin (); 


void loop () { 
   while (! gb.update ()); 
  gb.display.clear (RED);
 
  // dessine l'image 
  gb.display.drawImage (10, 10, myImg); 
}



Adamko

NEW 5 years ago

Sorunome Sorunome

l'ide me dit qu'il y a une erreur de compilation.

Adamko

NEW 5 years ago

Sorunome Sorunome

c moi dit:

# include <Gamebuino-Meta.h> 

const uint8_t myImgBuf [] = { 
   8, 8, // largeur, hauteur 
  1, 0, // frames 
  0, // boucle d'image 
  0xFF, // couleur transparente 
  1, // Mode couleur 

  0x07, 0x07, 0x07, 0x07, 
   0x70, 0x70, 0x70, 0x70, 
   0x07, 0x07, 0x07, 0x07, 
   0x70, 0x70, 0x70, 0x70, 
   0x07, 0x07, 0x07, 0x07, 
   0x70, 0x70, 0x70, 0x70, 
   0x07, 0x07, 0x07, 0x07, 
   0x70, 0x70, 0x70, 0x70, 


Image myImg (myImgBuf); sur cette ligne ca me dit "expected ',' or ';' before 'Image'"

void setup () { 
  gb.begin (); 


void loop () { 
   while (! gb.update ()); 
  gb.display.clear (RED);
 
  // dessine l'image 
  gb.display.drawImage (10, 10, myImg); 
}



clement

5 years ago

C est parcequ il manque un ; juste avant Image ;)  

const uint8_t myImgBuf [] = { 
   8, 8, // largeur, hauteur 
  1, 0, // frames 
  0, // boucle d'image 
  0xFF, // couleur transparente 
  1, // Mode couleur 

  0x07, 0x07, 0x07, 0x07, 
   0x70, 0x70, 0x70, 0x70, 
   0x07, 0x07, 0x07, 0x07, 
   0x70, 0x70, 0x70, 0x70, 
   0x07, 0x07, 0x07, 0x07, 
   0x70, 0x70, 0x70, 0x70, 
   0x07, 0x07, 0x07, 0x07, 
   0x70, 0x70, 0x70, 0x70, 
} ; //<<<<<<<<<<<<<<<<<<<<<--------------- celui la de point virgule 


Il faut bien lire les messages d erreurs souvent ils aident bien :)

++

clement

NEW 5 years ago

Adamko Adamko

C est parcequ il manque un ; juste avant Image ;)  

const uint8_t myImgBuf [] = { 
   8, 8, // largeur, hauteur 
  1, 0, // frames 
  0, // boucle d'image 
  0xFF, // couleur transparente 
  1, // Mode couleur 

  0x07, 0x07, 0x07, 0x07, 
   0x70, 0x70, 0x70, 0x70, 
   0x07, 0x07, 0x07, 0x07, 
   0x70, 0x70, 0x70, 0x70, 
   0x07, 0x07, 0x07, 0x07, 
   0x70, 0x70, 0x70, 0x70, 
   0x07, 0x07, 0x07, 0x07, 
   0x70, 0x70, 0x70, 0x70, 
} ; //<<<<<<<<<<<<<<<<<<<<<--------------- celui la de point virgule 


Il faut bien lire les messages d erreurs souvent ils aident bien :)

++

Adamko

5 years ago

ca fonctionne super bien. merci. je suis allé jeter un coup d'oueil a save the princess

Adamko

NEW 5 years ago

clement clement

ca fonctionne super bien. merci. je suis allé jeter un coup d'oueil a save the princess

sautax

NEW 5 years ago

Is there a way to delete the images in ram (when i no more need them)

Sorunome

5 years ago

If the image object is deleted then the associated ram buffer is deleted, too.

Deletion of that happens e.g. if they are scoped locally or with the delete keyword, in case of pointers

void someFunc() {
    Image img(/* blah *);
    // do stuff

    // image gets deleted as it is end of the function
}
Image* img_ptr;

void init() { img_ptr = new Image(/* stuff */); } // later on in your code delete img_ptr;


Please note that that can easily cause ram fragmentation