aboutsummaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authordcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db>2011-03-04 13:41:05 +0000
committerdcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db>2011-03-04 13:41:05 +0000
commite2e6c844afbf9d293f3201f1d1391e01d32510c2 (patch)
treee502ac63aee40ac70bb21cbc9bea8348535bd502 /java
parent0202d2f81b84591dd657c4672c189e94cd84dc8b (diff)
Add access methods for getting at the JPEG buffer
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@506 632fc199-4ca6-4c93-a231-07263d6284db
Diffstat (limited to 'java')
-rw-r--r--java/org/libjpegturbo/turbojpeg/TJDecompressor.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/java/org/libjpegturbo/turbojpeg/TJDecompressor.java b/java/org/libjpegturbo/turbojpeg/TJDecompressor.java
index 6b8592f..5515353 100644
--- a/java/org/libjpegturbo/turbojpeg/TJDecompressor.java
+++ b/java/org/libjpegturbo/turbojpeg/TJDecompressor.java
@@ -71,6 +71,16 @@ public class TJDecompressor {
return jpegSubsamp;
}
+ public byte[] getJPEGBuf() throws Exception {
+ if(jpegBuf == null) throw new Exception("JPEG buffer not initialized");
+ return jpegBuf;
+ }
+
+ public int getJPEGSize() throws Exception {
+ if(jpegBufSize < 1) throw new Exception("JPEG buffer not initialized");
+ return jpegBufSize;
+ }
+
public int getScaledWidth(int desiredWidth, int desiredHeight)
throws Exception {
if(jpegWidth < 1 || jpegHeight < 1)