projects
/
org.ibex.core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2003/09/23 08:25:00
[org.ibex.core.git]
/
src
/
org
/
xwt
/
plat
/
GCJ.cc
diff --git
a/src/org/xwt/plat/GCJ.cc
b/src/org/xwt/plat/GCJ.cc
index
3050a2b
..
f63c515
100644
(file)
--- a/
src/org/xwt/plat/GCJ.cc
+++ b/
src/org/xwt/plat/GCJ.cc
@@
-14,6
+14,8
@@
extern "C" {
#include <setjmp.h>
#include "jpeglib.h"
}
#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>
#include <org/xwt/plat/GCJ.h>
#include <java/io/InputStream.h>
#include <java/io/ByteArrayInputStream.h>
@@
-79,8
+81,11
@@
void skip_input_data (j_decompress_ptr cinfo, long num_bytes) {
}
}
}
}
-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;
struct jpeg_decompress_struct cinfo;
+ jIntArray data;
+ jint width;
+ jint height;
// set up our error handler
struct jpeg_error_mgr error_handler;
// set up our error handler
struct jpeg_error_mgr error_handler;
@@
-123,6
+128,7
@@
void org::xwt::plat::GCJ$JPEG::nativeDecompress() {
throw t;
}
jpeg_destroy_decompress(&cinfo);
throw t;
}
jpeg_destroy_decompress(&cinfo);
+ return org::xwt::Platform::createPicture(data, width, height);
}
// C++ new/delete operators (JvMalloc never fails)
}
// C++ new/delete operators (JvMalloc never fails)