Struggling with Reading uint8_t Array with unsigned values to/from progmem

Project: Trying to utilize RGB pixel strips.

Problem: After hours of reading docs and forum posts and trying various permutations I would like to ask for help correcting my code from reading and writing arrays of uint8_t (each value ranges from 0-256) to/from progmem. I have tried to mirror the instructions as closely as possible., There has to be some variation because my array’s are unsigned ints, instead of strings. The compiler seems to like my array, but the read from memory returns a value different than I stored. For example, the first byte of variable buffer should be decimal 255, but it reads back as decimal 35. Any help greatly appreciated.

#include <avr/io.h>
#include <avr/pgmspace.h>
#include <Adafruit_NeoPixel.h>

#define PIN 6

// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
//   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
//   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
//   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)
//   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(448, PIN, NEO_GRB + NEO_KHZ800);

prog_uint8_t imagerow1[84] PROGMEM = 
prog_uint8_t imagerow2[84] PROGMEM = 
prog_uint8_t imagerow3[84] PROGMEM = 
prog_uint8_t imagerow4[84] PROGMEM = 
prog_uint8_t imagerow5[84] PROGMEM = 
prog_uint8_t imagerow6[84] PROGMEM = 
prog_uint8_t imagerow7[84] PROGMEM = 
prog_uint8_t imagerow8[84] PROGMEM = 

PROGMEM const prog_uint8_t *fullimage[] =
  imagerow8 };

prog_uchar buffer[84];

void setup() {
  strip.begin();; // Initialize all pixels to 'off'

void loop() {

//draws a single image on the screen
void testimage(uint8_t wait) {

uint8_t oneChar = 127;
uint16_t oddcolumpixel=0;
uint16_t evencolumpixel=0;

//Don't forget  screensize to 24x16!!! 
	for(uint16_t r=1; r<8; r++) {
                memcpy_P(buffer, (uint8_t*)pgm_read_byte(&(fullimage[r-1])), 84);
                Serial.print("----Begin Row-"); Serial.print(r); Serial.println("---------");  
  		//Draw a row, two pixels at a time
      	      for(uint16_t j=0; j< 80; ) {                  
        	  strip.setPixelColor( oddcolumpixel, buffer[j], buffer[j+1], buffer[j+2]);
  		  strip.setPixelColor( evencolumpixel, buffer[j+3], buffer[j+4], buffer[j+5]);
                  Serial.print(buffer[j],DEC); Serial.print(","); Serial.print(buffer[j+1],DEC); Serial.print(","); Serial.print(buffer[j+2],DEC);Serial.println("");
                  Serial.print(buffer[j+3],DEC); Serial.print(","); Serial.print(buffer[j+4],DEC); Serial.print(","); Serial.print(buffer[j+5],DEC);Serial.println("");
                  //get ready to read the next two pixels
                  oddcolumpixel=oddcolumpixel+32;  //map to physical location on head
                  j=j+6;  //
              }//end row
             Serial.println("----End Row----------");; delay(wait);delay(wait);delay(wait);delay(wait);delay(wait);delay(wait);
	}//end screen

}//end test image funct

Your code appears to have mismatched braces.

You appear to be trying to create your progmem variables inside a function. I am not an expert on progmem, but it seems to me that variables that you want the compiler to allocate in the code memory rather than ram, would have to be either global or static, and not variables for which space is allocated each time the function call is initiated.

Read that page again. You can not retrieve the array with a memcopy you need to use the byte near method shown. Please post your code using the proper tags, doing it that way plays havoc with the iPad display when it comes to answering.

Your nested arrays are in progmem too. You will need two reads from flash.

//Access imagerow1
 memcpy_P(buffer, ( int8_t* ) pgm_read_word( &fullimage[ 0 ] ) , 84);

//Access imagerow8
 memcpy_P(buffer, ( int8_t* ) pgm_read_word( &fullimage[ 7 ] ) , 84);

As you are using the PROGMEM attribute, use normal types. ( prog_int8_t is just int8_t with PROGMEM added ).

Big, big progress, but, one last hurdle. Rows 1 and 2 read back from of progmem perfectly, however rows 3-8 read back incorrectly. Just to be sure it wasn't data I switched the data from row 1 and row 3 and the data didn't make a difference, regardless of the data row 3-8 read back seemingly random numbers, some look like they are from the first two rows. Smells like a memory leak to me, but I just can't seem to find the offending code.

Huge thanks to all 3 of you! I made changes based on suggestions with all 3 replies to my post to get this far. I have updated and reposted the modified code over the original post with the proper tagging around the code

Excerpt of Output from Serial.print... ----Begin Row-1--------- Row 1 looks great and so does Row 2 255,0,0,255,0,0,0,0,0,0,0,0, 0,0,0,0,0,0...0,0,0 --- Begin Row-3---------Trouble starts at Row 3 and continues to the Row 8 12,148,228,1,12,148,228,1,12,148,228,1,12,148,228,1,12,148,228,1,12...148,228,1