#include <setjmp.h>
#include "jpeglib.h"
}
+#include <org/xwt/Platform.h>
+#include <org/xwt/Picture.h>
#include <org/xwt/plat/GCJ.h>
#include <java/io/InputStream.h>
#include <java/io/ByteArrayInputStream.h>
}
}
-void org::xwt::plat::GCJ$JPEG::nativeDecompress() {
+org::xwt::Picture* org::xwt::plat::GCJ$JPEG::_decodeJPEG(java::io::InputStream* is, jstring name) {
struct jpeg_decompress_struct cinfo;
+ jIntArray data;
+ jint width;
+ jint height;
// set up our error handler
struct jpeg_error_mgr error_handler;
throw t;
}
jpeg_destroy_decompress(&cinfo);
+ return org::xwt::Platform::createPicture(data, width, height);
}
// C++ new/delete operators (JvMalloc never fails)