Sychronize JPEG camera and SD card

That's right, I'm sorry. The actual fact is that I misunderstood a comment: it's not the card but the library I'm using that only accepts txt: MemoryCard.h

//NOTE: The memoryCard libary can only create text files.

I will post you my loop function, it will be easier that way...

    //deactivate the flag eof
    eof = 0;

    //Reset
    count=camera.reset(response);
    delay(3000);

    //Take a foto
    count=camera.takePicture(response);

    //Take the size of the pic
    count = camera.getSize(response, &size);

    /*Those comments have been just copy-pasted, it's not me who wrote them:
    //Create a file called 'test.txt' on the SD card.
    //NOTE: The memoryCard libary can only create text files.
    //The file has to be renamed to .jpg when copied to a computer.
    */
    MemoryCard.open("/test.txt", true);

    //Read the camera and write the data to the card
    while(address < size)
    {
      //Starts reading at the current address
      count=camera.readData(response, address);

      //Stock it at the SD card
      for(int i=0; i<count; i++)
      {
        //If the end of file achieved (0xFF, 0xD9), active the eof flag
        if((response[i] == (char)0xD9) && (response[i-1]==(char)0xFF))eof=1;

        //Write the data to the card
        MemoryCard.file.print(response[i], BYTE);

        //If eof achieved, stop reading data
        if(eof==1)break;
      }

      //Increase the current adress by the number of data read
      address+=count;

      //Get out of the while loop if eof has been found
      if(eof==1)break;

    }
    //Close the file
    MemoryCard.close();

I'd also like to signal that I need the foto to be transformed into text, for further interests of my project, that's why I don't even try to keep the foto in jpg format.