Storing Image in ROM and sending it by ethernet

Yes, I know, sounds bad ... but I cannot use SD.
The image is 4kb. I made a Java program that creates an array with the values ??of the image. But when I try to send by ethernet, the Arduino stop (I guess it overload the memory somehow). How make the compiler use directly the ROM, not RAM memory?

PROGMEM prog_uchar uniscImage[] = {71, 73, 70, 56, 57, 97, 222, 0, 53, 0, 112, 0, 0, 33, 249, 4, 1, 0, 0, 252, 0, 44, 0, 0, 0, 0, 222, 0, 53, 0, 135, 0, 0, 0, 0, 0, 51, 0, 0, 102, 0, 0, 153, 0, 0, 204, 0, 0, 255, 0, 43, 0, 0, 43, 51, 0, 43, 102, 0, 43, 153, 0, 43, 204, 0, 43, 255, 0, 85, 0, 0, 85, 51, 0, 85, 102, 0, 85, 153, 0, 85, 204, 0, 85, 255, 0, 128, 0, 0, 128, 51, 0, 128, 102, 0, 128, 153, 0, 128, 204, 
0, 128, 255, 0, 170, 0, 0, 170, 51, 0, 170, 102, 0, ............<4kb>.......... , 175, 83, 83, 64, 128, 193, 21, 207, 235, 50, 35, 196, 18, 215, 155, 23, 229, 57, 115, 54, 242, 6, 64, 96, 31, 197, 65, 56, 154, 48, 115, 209, 224, 60, 201, 81, 126, 180, 59, 26, 75, 25, 20, 174, 183, 15, 223, 193, 129, 
238, 22, 10, 184, 102, 69, 152, 209, 176, 140, 123, 156, 208, 80, 108, 108, 199, 187, 68, 225, 122, 224, 148, 179, 26, 131, 191, 9, 144, 153, 42, 99, 147, 36, 164, 49, 69, 145, 175, 95, 87, 186, 117, 164, 12, 8, 75, 26, 36, 182, 20, 141, 49, 30, 120, 170, 175, 22, 242, 166, 91, 197, 87, 39, 165, 100, 193, 106, 19, 253, 70, 98, 218, 231, 193, 36, 129, 93, 56, 112, 186, 41, 177, 181, 108, 228, 88, 110, 91, 54, 12, 129, 61, 8, 80, 64, 1, 1, 0, 59
};
   client.println("HTTP/1.0 200 OK");

   client.println("Content-Type: image/gif");
   client.println();
   for(x=0; x<sizeof(uniscImage); x++) {
      client.write(uniscImage[x]);
   }

Thanks :wink:

How make the compiler use directly the ROM, not RAM memory?

Use PROGMEM
http://www.arduino.cc/en/Reference/PROGMEM

AWOL:

How make the compiler use directly the ROM, not RAM memory?

Use PROGMEM
http://www.arduino.cc/en/Reference/PROGMEM

Ok, thanks :wink: