splitting a jpeg into 200 byte segments

Hi,

I have a 5kB jpeg image saved on a SD card in my arduino project.

Many thanks

pseudocode:

open file
while not end of file
  {
   read byte
  add byte to payload
  if payload full
    { send }
  }
send remaining payload
close file