Convert the image into an array of eg 40 x 50 “tiles” which are averaged to the colour of the underlying image pixels - think of a mosaic;
Filters > Blur > Pixellize
Convert those mosaic tiles to a preset palette corresponding to a set eg 32 copic alcohol markers ( any palette will do);
Image > Mode > Indexed
and you provide a palette
Print out a text file row by row of the tile grid reference and it’s corresponding palette colour;
Why do you need all the pixels then? Let’s go back to the start. So starting with this:

Convert the image into an array of eg 40 x 50 “tiles” which are averaged to the colour of the underlying image pixels - think of a mosaic;
Image > Scale image
to 40x50 pixels using the Linear
interpolation

Convert those mosaic tiles to a preset palette corresponding to a set eg 32 copic alcohol markers ( any palette will do);
Image > Mode > Indexed
and you provide a palette
(here with 12 colors)
The output is the text file or markup file for creating a hand painted copy of the mosaic
You can export as C header, that gives you the color map and the color indexes of the pixels:
/* GIMP header image file format (INDEXED): /tmp/MS-760-Paris.h */
static unsigned int width = 60;
static unsigned int height = 38;
/* Call this macro repeatedly. After each use, the pixel data can be extracted */
#define HEADER_PIXEL(data,pixel) {\
pixel[0] = header_data_cmap[(unsigned char)data[0]][0]; \
pixel[1] = header_data_cmap[(unsigned char)data[0]][1]; \
pixel[2] = header_data_cmap[(unsigned char)data[0]][2]; \
data ++; }
static unsigned char header_data_cmap[256][3] = {
{ 45, 45, 43},
{ 42, 59, 84},
{ 83, 85, 85},
{ 55, 98,157},
{ 77,102,144},
{100,113,144},
{115,113,114},
{137,145,161},
{145,145,147},
{180,141,114},
{168,170,173},
{200,202,202},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255},
{255,255,255}
};
static unsigned char header_data[] = {
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,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,3,3,3,3,3,3,
3,3,3,3,3,3,3,7,8,10,10,10,10,10,10,11,
11,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,4,5,5,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,5,10,8,10,10,10,10,10,10,
10,10,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,7,10,10,10,7,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,10,10,8,10,10,10,10,10,
10,11,7,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,5,10,10,10,10,5,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,7,10,10,10,10,10,10,10,
10,11,10,3,3,3,3,3,4,5,5,5,5,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,10,10,10,10,10,5,3,3,3,3,3,
3,3,3,3,3,3,3,3,5,10,8,8,10,10,10,10,
10,10,10,7,7,8,8,9,9,10,9,9,10,6,4,5,
5,5,5,5,5,5,4,3,3,3,3,3,
3,3,3,3,3,7,10,8,10,10,10,4,3,3,3,3,
3,3,3,3,3,3,3,3,4,8,8,8,10,10,10,10,
11,8,10,11,11,11,11,6,2,10,1,2,6,10,6,10,
11,11,11,11,11,11,11,7,4,3,3,3,
3,3,3,3,3,5,10,8,8,10,10,10,3,3,3,3,
3,3,3,3,3,3,3,3,3,8,8,8,8,8,8,10,
11,11,11,11,11,10,11,0,0,6,2,2,0,8,6,8,
11,11,11,11,11,11,10,6,4,3,3,3,
3,3,3,3,4,5,8,8,8,10,10,10,2,4,3,3,
3,3,3,3,3,3,3,3,4,6,8,8,8,10,10,10,
8,8,8,8,6,6,6,10,0,0,0,0,0,2,2,6,
11,10,8,8,6,2,2,4,3,3,3,3,
3,3,3,3,4,0,6,10,10,10,10,11,0,2,5,4,
3,3,4,5,5,7,10,10,10,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3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,4,7,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3
};
I don’t know what the purpose of this is, but the weirdest Gimp script I wrote translates an image to the instructions for a Brother knitting machine and that made me a star in knitting circles of the Midwest several years ago 