text: #include <stdio.h>
  #include <stdlib.h>
  #include <stdint.h>
  
  #define LV_ATTRIBUTE_MEM_ALIGN
  #define LV_ATTRIBUTE_IMG_ALARM_16PX
  
  #define LV_COLOR_DEPTH 32
  //#define LV_COLOR_DEPTH 16
  #define LV_IMG_PX_SIZE_ALPHA_BYTE 4  /* for 32 bit color */
  //#define LV_IMG_PX_SIZE_ALPHA_BYTE 3     /* for 16 bit color */
  #define LV_IMG_CF_TRUE_COLOR_ALPHA 5 /* for 32 bit color */
  // #define LV_IMG_CF_TRUE_COLOR_ALPHA 3    /* for 16 bit color */
  // #define LV_COLOR_16_SWAP 1
  
  /** Image header it is compatible with
   * the result from image converter utility*/
  
  typedef struct {
  
      uint32_t cf : 5;          /* Color format: See `lv_img_color_format_t`*/
      uint32_t always_zero : 3; /*It the upper bits of the first byte. Always zero to look like a
                                   non-printable character*/
  
      uint32_t reserved : 2; /*Reserved to be used later*/
  
      uint32_t w : 11; /*Width of the image map*/
      uint32_t h : 11; /*Height of     the image map*/
  } lv_img_header_t;
  
  typedef struct {
      lv_img_header_t header;
      uint32_t data_size;
      const uint8_t * data;
  } lv_img_dsc_t;
  
  
  #ifndef LV_ATTRIBUTE_MEM_ALIGN
  #define LV_ATTRIBUTE_MEM_ALIGN
  #endif
  
  #ifndef LV_ATTRIBUTE_IMG_INFO_3_8PX
  #define LV_ATTRIBUTE_IMG_INFO_3_8PX
  #endif
  
  const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_INFO_3_8PX uint8_t info_3_8px_map[] = {
  #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8
    /*Pixel format: Alpha 8 bit, Red: 3 bit, Green: 3 bit, Blue: 2 bit*/
    0x04, 0x00, 0x18, 0x24, 0x18, 0xac, 0x18, 0xf0, 0x18, 0xf3, 0x18, 0xb4, 0x18, 0x2b, 0x0c, 0x00, 
    0x18, 0x23, 0x18, 0xec, 0x9e, 0xff, 0xdf, 0xff, 0xdf, 0xff, 0x9e, 0xff, 0x18, 0xf3, 0x18, 0x2c, 
    0x18, 0xa7, 0x18, 0xff, 0x39, 0xff, 0x18, 0xff, 0x39, 0xff, 0xff, 0xff, 0x18, 0xff, 0x18, 0xb7, 
    0x18, 0xe7, 0x18, 0xff, 0x18, 0xff, 0x9e, 0xff, 0xdf, 0xff, 0xbf, 0xff, 0x18, 0xff, 0x18, 0xf7, 
    0x18, 0xe7, 0x18, 0xff, 0x18, 0xff, 0x59, 0xff, 0x9e, 0xff, 0xff, 0xff, 0x18, 0xff, 0x18, 0xf7, 
    0x18, 0xa7, 0x18, 0xff, 0x39, 0xff, 0x18, 0xff, 0x39, 0xff, 0xff, 0xff, 0x18, 0xff, 0x18, 0xb7, 
    0x18, 0x23, 0x18, 0xec, 0x9e, 0xff, 0xdf, 0xff, 0xdf, 0xff, 0x9e, 0xff, 0x18, 0xf3, 0x18, 0x2c, 
    0x04, 0x00, 0x18, 0x24, 0x18, 0xac, 0x18, 0xf0, 0x18, 0xf3, 0x18, 0xb3, 0x18, 0x2b, 0x0c, 0x00, 
  #endif
  #if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP == 0
    /*Pixel format: Alpha 8 bit, Red: 5 bit, Green: 6 bit, Blue: 5 bit*/
    0xe0, 0x00, 0x00, 0x40, 0x06, 0x24, 0x40, 0x06, 0xac, 0x40, 0x06, 0xf0, 0x40, 0x06, 0xf3, 0x40, 0x06, 0xb4, 0x40, 0x06, 0x2b, 0x60, 0x03, 0x00, 
    0x40, 0x06, 0x23, 0x40, 0x06, 0xec, 0xaf, 0x7e, 0xff, 0x58, 0xc7, 0xff, 0x78, 0xc7, 0xff, 0xaf, 0x7e, 0xff, 0x40, 0x06, 0xf3, 0x40, 0x06, 0x2c, 
    0x40, 0x06, 0xa7, 0x40, 0x06, 0xff, 0x45, 0x2e, 0xff, 0x40, 0x06, 0xff, 0x45, 0x2e, 0xff, 0x9b, 0xdf, 0xff, 0x40, 0x06, 0xff, 0x40, 0x06, 0xb7, 
    0x40, 0x06, 0xe7, 0x40, 0x06, 0xff, 0x40, 0x06, 0xff, 0xd1, 0x8e, 0xff, 0x58, 0xc7, 0xff, 0x15, 0xaf, 0xff, 0x40, 0x06, 0xff, 0x40, 0x06, 0xf7, 
    0x40, 0x06, 0xe7, 0x40, 0x06, 0xff, 0x40, 0x06, 0xff, 0x68, 0x46, 0xff, 0xaf, 0x7e, 0xff, 0x9a, 0xd7, 0xff, 0x40, 0x06, 0xff, 0x40, 0x06, 0xf7, 
    0x40, 0x06, 0xa7, 0x40, 0x06, 0xff, 0x66, 0x36, 0xff, 0x40, 0x06, 0xff, 0x45, 0x2e, 0xff, 0x9b, 0xdf, 0xff, 0x40, 0x06, 0xff, 0x40, 0x06, 0xb7, 
    0x40, 0x06, 0x23, 0x40, 0x06, 0xec, 0xd1, 0x8e, 0xff, 0x58, 0xc7, 0xff, 0x58, 0xc7, 0xff, 0xaf, 0x7e, 0xff, 0x40, 0x06, 0xf3, 0x40, 0x06, 0x2c, 
    0xe0, 0x00, 0x00, 0x40, 0x06, 0x24, 0x40, 0x06, 0xac, 0x40, 0x06, 0xf0, 0x40, 0x06, 0xf3, 0x40, 0x06, 0xb3, 0x40, 0x06, 0x2b, 0x60, 0x03, 0x00, 
  #endif
  #if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP != 0
    /*Pixel format: Alpha 8 bit, Red: 5 bit, Green: 6 bit, Blue: 5 bit  BUT the 2  color bytes are swapped*/
    0x00, 0xe0, 0x00, 0x06, 0x40, 0x24, 0x06, 0x40, 0xac, 0x06, 0x40, 0xf0, 0x06, 0x40, 0xf3, 0x06, 0x40, 0xb4, 0x06, 0x40, 0x2b, 0x03, 0x60, 0x00, 
    0x06, 0x40, 0x23, 0x06, 0x40, 0xec, 0x7e, 0xaf, 0xff, 0xc7, 0x58, 0xff, 0xc7, 0x78, 0xff, 0x7e, 0xaf, 0xff, 0x06, 0x40, 0xf3, 0x06, 0x40, 0x2c, 
    0x06, 0x40, 0xa7, 0x06, 0x40, 0xff, 0x2e, 0x45, 0xff, 0x06, 0x40, 0xff, 0x2e, 0x45, 0xff, 0xdf, 0x9b, 0xff, 0x06, 0x40, 0xff, 0x06, 0x40, 0xb7, 
    0x06, 0x40, 0xe7, 0x06, 0x40, 0xff, 0x06, 0x40, 0xff, 0x8e, 0xd1, 0xff, 0xc7, 0x58, 0xff, 0xaf, 0x15, 0xff, 0x06, 0x40, 0xff, 0x06, 0x40, 0xf7, 
    0x06, 0x40, 0xe7, 0x06, 0x40, 0xff, 0x06, 0x40, 0xff, 0x46, 0x68, 0xff, 0x7e, 0xaf, 0xff, 0xd7, 0x9a, 0xff, 0x06, 0x40, 0xff, 0x06, 0x40, 0xf7, 
    0x06, 0x40, 0xa7, 0x06, 0x40, 0xff, 0x36, 0x66, 0xff, 0x06, 0x40, 0xff, 0x2e, 0x45, 0xff, 0xdf, 0x9b, 0xff, 0x06, 0x40, 0xff, 0x06, 0x40, 0xb7, 
    0x06, 0x40, 0x23, 0x06, 0x40, 0xec, 0x8e, 0xd1, 0xff, 0xc7, 0x58, 0xff, 0xc7, 0x58, 0xff, 0x7e, 0xaf, 0xff, 0x06, 0x40, 0xf3, 0x06, 0x40, 0x2c, 
    0x00, 0xe0, 0x00, 0x06, 0x40, 0x24, 0x06, 0x40, 0xac, 0x06, 0x40, 0xf0, 0x06, 0x40, 0xf3, 0x06, 0x40, 0xb3, 0x06, 0x40, 0x2b, 0x03, 0x60, 0x00, 
  #endif
  #if LV_COLOR_DEPTH == 32
    0x00, 0x1c, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x24, 0x00, 0xc8, 0x00, 0xac, 0x00, 0xc8, 0x00, 0xf0, 0x00, 0xc8, 0x00, 0xf3, 0x00, 0xc8, 0x00, 0xb4, 0x00, 0xc8, 0x00, 0x2b, 0x00, 0x6c, 0x00, 0x00, 
    0x00, 0xc8, 0x00, 0x23, 0x00, 0xc8, 0x00, 0xec, 0x7a, 0xd5, 0x7a, 0xff, 0xc0, 0xea, 0xc0, 0xff, 0xc4, 0xeb, 0xc4, 0xff, 0x7a, 0xd5, 0x7a, 0xff, 0x00, 0xc8, 0x00, 0xf3, 0x00, 0xc8, 0x00, 0x2c, 
    0x00, 0xc8, 0x00, 0xa7, 0x00, 0xc8, 0x00, 0xff, 0x28, 0xca, 0x28, 0xff, 0x00, 0xc8, 0x00, 0xff, 0x2c, 0xca, 0x2c, 0xff, 0xd8, 0xf2, 0xd8, 0xff, 0x00, 0xc8, 0x00, 0xff, 0x00, 0xc8, 0x00, 0xb7, 
    0x00, 0xc8, 0x00, 0xe7, 0x00, 0xc8, 0x00, 0xff, 0x00, 0xc8, 0x00, 0xff, 0x8b, 0xda, 0x8b, 0xff, 0xc2, 0xe9, 0xc2, 0xff, 0xa5, 0xe1, 0xa5, 0xff, 0x00, 0xc8, 0x00, 0xff, 0x00, 0xc8, 0x00, 0xf7, 
    0x00, 0xc8, 0x00, 0xe7, 0x00, 0xc8, 0x00, 0xff, 0x00, 0xc8, 0x00, 0xff, 0x40, 0xcc, 0x40, 0xff, 0x7a, 0xd5, 0x7a, 0xff, 0xd1, 0xef, 0xd1, 0xff, 0x00, 0xc8, 0x00, 0xff, 0x00, 0xc8, 0x00, 0xf7, 
    0x00, 0xc8, 0x00, 0xa7, 0x00, 0xc8, 0x00, 0xff, 0x2f, 0xcb, 0x2f, 0xff, 0x00, 0xc8, 0x00, 0xff, 0x2c, 0xca, 0x2c, 0xff, 0xd7, 0xf2, 0xd7, 0xff, 0x00, 0xc8, 0x00, 0xff, 0x00, 0xc8, 0x00, 0xb7, 
    0x00, 0xc8, 0x00, 0x23, 0x00, 0xc8, 0x00, 0xec, 0x89, 0xd9, 0x89, 0xff, 0xbf, 0xe9, 0xbf, 0xff, 0xc4, 0xea, 0xc4, 0xff, 0x79, 0xd5, 0x79, 0xff, 0x00, 0xc8, 0x00, 0xf3, 0x00, 0xc8, 0x00, 0x2c, 
    0x00, 0x1c, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x24, 0x00, 0xc8, 0x00, 0xac, 0x00, 0xc8, 0x00, 0xf0, 0x00, 0xc8, 0x00, 0xf3, 0x00, 0xc8, 0x00, 0xb3, 0x00, 0xc8, 0x00, 0x2b, 0x00, 0x6c, 0x00, 0x00, 
  #endif
  };
  
  const lv_img_dsc_t info_3_8px = {
    .header.always_zero = 0,
    .header.w = 8,
    .header.h = 8,
    .data_size = 64 * LV_IMG_PX_SIZE_ALPHA_BYTE,
    .header.cf = LV_IMG_CF_TRUE_COLOR_ALPHA,
    .data = info_3_8px_map,
  };
  
  /*
   * writing the pixel map
   */
  
  int main(int argc, char **argv) {
    FILE *fp;
    char *binFile;
    
    binFile="info_3_8px_argb8888.bin";  /* 32 bit color */
  
    
    fp = fopen(binFile, "wb");
    fwrite(info_3_8px_map,info_3_8px.data_size,1,fp);
    fclose(fp);
    
  }
  