Help converting RGB565 to RGB888???

Can anyone help me in converting the values into RGB values? I used the software here Electronics - Henning Karlsen to convert my image to an array but I'm struggling to convert it into RGB values for my Neopixels. Below is an example of image data

// Generated by  : ImageConverter 565 v2.2
// Generated from: BS_Zelda_Heart_Container.png
// Time generated: 12/12/2014 9:43:45 PM
// Dimensions    : 16x16 pixels
// Size          : 512 Bytes

#include <avr/pgmspace.h>

const unsigned short BS_Zelda_Heart_Container[0x100] PROGMEM ={
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,   // 0x0010 (16)
0x0000, 0x0000, 0x0000, 0xFFDF, 0xFFDF, 0xFFDF, 0x0000, 0x0000, 0x0000, 0x0000, 0xFFDF, 0xFFDF, 0xFFDF, 0x0000, 0x0000, 0x0000,   // 0x0020 (32)
0x0000, 0x0000, 0xFFDF, 0x0000, 0x0000, 0x0000, 0xFFDF, 0x0000, 0x0000, 0xFFDF, 0x0000, 0x0000, 0x0000, 0xFFDF, 0x0000, 0x0000,   // 0x0030 (48)
0x0000, 0xFFDF, 0x0000, 0xFFDF, 0xFFDF, 0x99C7, 0x0000, 0xFFDF, 0xFFDF, 0x0000, 0x99C7, 0x99C7, 0x99C7, 0x0000, 0xFFDF, 0x0000,   // 0x0040 (64)
0x0000, 0xFFDF, 0x0000, 0xFFDF, 0xFFDF, 0x99C7, 0x99C7, 0x0000, 0x0000, 0x99C7, 0x99C7, 0x99C7, 0x99C7, 0x99C7, 0xFFDF, 0x0000,   // 0x0050 (80)
0x0000, 0xFFDF, 0x0000, 0x99C7, 0x99C7, 0x99C7, 0xFACB, 0xFACB, 0x99C7, 0x99C7, 0xFACB, 0xFACB, 0x99C7, 0x99C7, 0xFFDF, 0x0000,   // 0x0060 (96)
0x0000, 0xFFDF, 0x0000, 0x99C7, 0x99C7, 0xFACB, 0xFACB, 0xFACB, 0xFACB, 0xFACB, 0xFACB, 0xFACB, 0xFACB, 0x99C7, 0xFFDF, 0x0000,   // 0x0070 (112)
0x0000, 0xFFDF, 0x0000, 0x99C7, 0x99C7, 0xFACB, 0xFACB, 0xFACB, 0xFACB, 0xFACB, 0xFACB, 0xFACB, 0xFACB, 0x99C7, 0xFFDF, 0x0000,   // 0x0080 (128)
0x0000, 0x0000, 0xFFDF, 0x0000, 0x99C7, 0xFACB, 0xFACB, 0xFCD3, 0xFCD3, 0xFACB, 0xFCD3, 0xFCD3, 0xFACB, 0xFFDF, 0x0000, 0x0000,   // 0x0090 (144)
0x0000, 0x0000, 0xFFDF, 0x0000, 0x99C7, 0xFACB, 0xFACB, 0xFCD3, 0xFCD3, 0xFCD3, 0xFCD3, 0xFCD3, 0xFACB, 0xFFDF, 0x0000, 0x0000,   // 0x00A0 (160)
0x0000, 0x0000, 0x0000, 0xFFDF, 0x0000, 0x99C7, 0xFACB, 0xFCD3, 0xFCD3, 0xFCD3, 0xFCD3, 0xFCD3, 0xFFDF, 0x0000, 0x0000, 0x0000,   // 0x00B0 (176)
0x0000, 0x0000, 0x0000, 0x0000, 0xFFDF, 0x99C7, 0xFACB, 0xFACB, 0xFCD3, 0xFCD3, 0xFCD3, 0xFFDF, 0x0000, 0x0000, 0x0000, 0x0000,   // 0x00C0 (192)
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFFDF, 0x99C7, 0xFACB, 0xFACB, 0xFCD3, 0xFFDF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,   // 0x00D0 (208)
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFFDF, 0x99C7, 0xFACB, 0xFFDF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,   // 0x00E0 (224)
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFFDF, 0xFFDF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,   // 0x00F0 (240)
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,   // 0x0100 (256)
};

Each of these values contain data for one pixel, 5 bits for R, 6 bits for G, 5 bits for B

To extract those values, you have to do something like this:

uint8_t r = ((color >> 11) & 0x1F);
uint8_t g = ((color >> 5) & 0x3F);
uint8_t b = (color & 0x1F);

So, that was for extracting RGB565 as R5, G6, B5. But you also need to convert to R8, G8, B8

Here is a solution:

r = ((((color >> 11) & 0x1F) * 527) + 23) >> 6;
g = ((((color >> 5) & 0x3F) * 259) + 33) >> 6;
b = (((color & 0x1F) * 527) + 23) >> 6;

Then, to RGB888 if you want:

uint32_t RGB888 = r << 16 | g << 8 | b;

But why not just convert your image directly to RGB888 instead? Is it only because you didn't find the right tool to do this? I have a custom Paint.Net plugin to export to different formats, tell me if you want it (I'll have to do some work to it before I can give it to you)

Thanks guix! That worked for me but I then did as you suggested and went to 888. I found a nice utility that will pump out hex arrays for an image in pretty much any format. http://www.meraman.com/htmls/en/ImageConvert.html

You can paste them right into the sketch and store as uint8 array to PROGMEM.