My problem is that this process is too slow (somewhere in the order of 18 seconds). If I link the jpeg directly into the binary using bin2s, however, then the process very quick. Below is some example code:
Code: Select all
FILE* file = fopen("files/my_image.jpg", "rb");
uint8* buffer1 = new uint8[256*192*4];
uint16* buffer2 = new uint16[256*192*4];
while (!feof(file)){
fread(buffer1, sizeof(unsigned char), 1, file);
}
JPEG_DecompressImage (buffer1, buffer2, 256, 192);
dmaCopy(buffer2, BG_GFX, 256*192);
Thanks