Creating .h files for LCD Sprites

I’ve been using Hex Workshop by Breakpoint Software for many years and only now realised i can export files as text formatted for .cpp use

for my use i “print screened” the hackaday web page, pasted it into photoshop, copied the skull logo and pasted it into a new window, for my needs i reduced the image to 49x45 pixels and saved the file in .raw format.

next i loaded the image into Hex Workshop and exported the file selecting .c filetype, edited the header, renamed the file giving it .h extension, this is what i ended up with, too many chars to show it here but you get the idea, it displays the hackaday skull on rgb lcd

#ifndef TEST_H
#define TEST_H

char test[]={ 
    
    0x1E, 0x0B, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 
    0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 
    0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 
    0x0B, 0x1E, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x11, 0x0B, 0x03, 0x00, 0x00, 0x00, 0x00, ........................
  
    ...................0x4C, 0xB8, 0xED, 0xF6, 0x66, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x1E, 0x0B, 0x0F, 0x0F, 0x0F, 0x0F, 
    0x1F, 0x20, 0x1C, 0x11, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 
    0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 
    0x0F, 0x0F, 0x0F, 0x10, 0x1A, 0x21, 0x1D, 0x0F, 0x0F, 0x0F, 0x0B, 0x1E, 
};

#endif

Main Program that displays the sprite on the screen

#include "HX8347.h"
#include "logo.h"
#include "test.h"

HX8347 glcd;

  int x1 = 100;
  int y1 = 50;
  int x2 = 95;
  int y2 = 140;

  uint16_t i;
  
void setup()
{
  glcd.main_init(); 
  glcd.Pant(0xffff);

}
void loop()
{
    glcd.address_set(x1,y1,x1+39,y1+39); 
    for(i=0; i<sizeof(logo); i+=2)
    {
     glcd.cld_write_color(logo[i+1], logo[i]);
    }
    
    glcd.address_set(x2,y2,x2+49,y2+45); 
    for(i=0; i<sizeof(test); i++)
    {
      glcd.main_Write_DATA(test[i]);
    }
  while(1);  // Wait here
}