This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

reading images on SD Card mcb2300

I am working on MCB 2300 kit which has got LPC2378 processor. It has got an SD card as well. I can read, write to some text files on the card. But now I want to read some images from SD Card. When i tried to read the images, it gives back some garbage value and then the program gets hang up. I want to read the pixel information of the image. Please let me know how to do it? I am using keil uVision4 IDE

Parents
  • You need to treat the file as binary (not text) data, i.e. no end-of-line conversions or other special character handling.

    But you also need to write code for the specific image file format. If you are going to read data from a GIF file, then you need to implement code that understands the GIF file format. Same for JPEG, PNG, BMP, TIFF or any other standard image format.

    When you are able to extract binary data from the SD card, the rest of the processing will be the same as if a PC program decoded the image file.

Reply
  • You need to treat the file as binary (not text) data, i.e. no end-of-line conversions or other special character handling.

    But you also need to write code for the specific image file format. If you are going to read data from a GIF file, then you need to implement code that understands the GIF file format. Same for JPEG, PNG, BMP, TIFF or any other standard image format.

    When you are able to extract binary data from the SD card, the rest of the processing will be the same as if a PC program decoded the image file.

Children