added code for mp3 and jpeg parsing
added interface for data sources
This commit is contained in:
24
data/formats/jpeg/test.cpp
Normal file
24
data/formats/jpeg/test.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#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();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user