25 lines
439 B
C++
25 lines
439 B
C++
#include "JPEGDEC.h"
|
|
#include <iostream>
|
|
#include "testimage.h"
|
|
|
|
// gcc -D__LINUX__ jpeg.c JPEGDEC.cpp test.cpp
|
|
|
|
int drawJPEG(JPEGDRAW* pDraw) {
|
|
return 1;
|
|
}
|
|
|
|
int main(void) {
|
|
|
|
JPEGDEC jpeg;
|
|
int res = jpeg.openRAM(aaa_jpg, aaa_jpg_len, drawJPEG);
|
|
|
|
std::cout << res << std::endl;
|
|
|
|
if (res) {
|
|
jpeg.setPixelType(RGB565_BIG_ENDIAN);
|
|
jpeg.decode(0, 0, 0);//40, 100, JPEG_SCALE_QUARTER | JPEG_EXIF_THUMBNAIL);
|
|
jpeg.close();
|
|
}
|
|
|
|
}
|