diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c3a63fc..70b7f927 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1530,6 +1530,10 @@ if(WITH_TURBOJPEG) COMMAND ${BASH} ${CMAKE_CURRENT_BINARY_DIR}/tjbenchtest -arithmetic COMMAND echo tjbenchtest -arithmetic -yuv COMMAND ${BASH} ${CMAKE_CURRENT_BINARY_DIR}/tjbenchtest -arithmetic -yuv + COMMAND echo tjbenchtest -lossless + COMMAND ${BASH} ${CMAKE_CURRENT_BINARY_DIR}/tjbenchtest -lossless + COMMAND echo tjbenchtest -lossless -alloc + COMMAND ${BASH} ${CMAKE_CURRENT_BINARY_DIR}/tjbenchtest -lossless -alloc COMMAND echo tjexampletest COMMAND ${BASH} ${CMAKE_CURRENT_BINARY_DIR}/tjexampletest COMMAND echo tjbenchtest.java @@ -1546,6 +1550,8 @@ if(WITH_TURBOJPEG) COMMAND echo tjbenchtest.java -arithmetic -yuv COMMAND ${BASH} ${CMAKE_CURRENT_BINARY_DIR}/tjbenchtest.java -arithmetic -yuv + COMMAND echo tjbenchtest.java -lossless + COMMAND ${BASH} ${CMAKE_CURRENT_BINARY_DIR}/tjbenchtest.java -lossless COMMAND echo tjexampletest.java COMMAND ${BASH} ${CMAKE_CURRENT_BINARY_DIR}/tjexampletest.java DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/tjbenchtest @@ -1566,6 +1572,10 @@ if(WITH_TURBOJPEG) COMMAND ${BASH} ${CMAKE_CURRENT_BINARY_DIR}/tjbenchtest -progressive COMMAND echo tjbenchtest -progressive -yuv COMMAND ${BASH} ${CMAKE_CURRENT_BINARY_DIR}/tjbenchtest -progressive -yuv + COMMAND echo tjbenchtest -lossless + COMMAND ${BASH} ${CMAKE_CURRENT_BINARY_DIR}/tjbenchtest -lossless + COMMAND echo tjbenchtest -lossless -alloc + COMMAND ${BASH} ${CMAKE_CURRENT_BINARY_DIR}/tjbenchtest -lossless -alloc COMMAND echo tjexampletest COMMAND ${BASH} ${CMAKE_CURRENT_BINARY_DIR}/tjexampletest DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/tjbenchtest diff --git a/ChangeLog.md b/ChangeLog.md index cc5df1e4..a5597fad 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -36,7 +36,8 @@ the C API and `TJ.FLAG_LOSSLESS` in the Java API), and cjpeg/TJBench command-line argument (`-lossless`) can be used to create a lossless JPEG image. (Decompression of lossless JPEG images is handled automatically.) Note that the TurboJPEG API and TJBench can currently only be used to create and -decompress 8-bit lossless JPEG images. +decompress 8-bit lossless JPEG images. Refer to [libjpeg.txt](libjpeg.txt), +[usage.txt](usage.txt), and the TurboJPEG API documentation for more details. 5. Introduced a new flag in the TurboJPEG C and Java APIs (`TJFLAG_ARITHMETIC` and `TJ.FLAG_ARITHMETIC`, respectively) that causes the library to use @@ -46,6 +47,11 @@ API and `TJTransform.OPT_ARITHMETIC` in the Java API) has been introduced, allowing arithmetic entropy coding to be enabled for selected transforms in a multi-transform operation. +6. Added a new TurboJPEG C API function (`tjDecompressHeader4()`) and Java API +method (`TJDecompressor.getFlags()`) that allow calling programs to determine +whether the JPEG image being decompressed uses progressive and/or arithmetic +entropy coding or is a lossless JPEG image. + 2.1.5 ===== diff --git a/doc/html/annotated.html b/doc/html/annotated.html index c735a5a7..de0462ee 100644 --- a/doc/html/annotated.html +++ b/doc/html/annotated.html @@ -23,7 +23,7 @@
TurboJPEG -  2.1.4 +  2.2
diff --git a/doc/html/classes.html b/doc/html/classes.html index 42f38f6b..ac3c535b 100644 --- a/doc/html/classes.html +++ b/doc/html/classes.html @@ -23,7 +23,7 @@
TurboJPEG -  2.1.4 +  2.2
diff --git a/doc/html/functions.html b/doc/html/functions.html index 5de4c6fb..68fcde3f 100644 --- a/doc/html/functions.html +++ b/doc/html/functions.html @@ -23,7 +23,7 @@
TurboJPEG -  2.1.4 +  2.2
diff --git a/doc/html/functions_vars.html b/doc/html/functions_vars.html index 2b010f40..d918435d 100644 --- a/doc/html/functions_vars.html +++ b/doc/html/functions_vars.html @@ -23,7 +23,7 @@
TurboJPEG -  2.1.4 +  2.2
diff --git a/doc/html/group___turbo_j_p_e_g.html b/doc/html/group___turbo_j_p_e_g.html index ccfa8866..8e2b2229 100644 --- a/doc/html/group___turbo_j_p_e_g.html +++ b/doc/html/group___turbo_j_p_e_g.html @@ -23,7 +23,7 @@
TurboJPEG -  2.1.4 +  2.2
@@ -281,9 +281,9 @@ Functions DLLEXPORT tjhandle tjInitDecompress (void)  Create a TurboJPEG decompressor instance. More...
  -DLLEXPORT int tjDecompressHeader3 (tjhandle handle, const unsigned char *jpegBuf, unsigned long jpegSize, int *width, int *height, int *jpegSubsamp, int *jpegColorspace) - Retrieve information about a JPEG image without decompressing it, or prime the decompressor with quantization and Huffman tables. More...
-  +DLLEXPORT int tjDecompressHeader4 (tjhandle handle, const unsigned char *jpegBuf, unsigned long jpegSize, int *width, int *height, int *jpegSubsamp, int *jpegColorspace, int *jpegFlags) + Retrieve information about a JPEG image without decompressing it, or prime the decompressor with quantization and Huffman tables. More...
+  DLLEXPORT tjscalingfactortjGetScalingFactors (int *numscalingfactors)  Returns a list of fractional scaling factors that the JPEG decompressor in this implementation of TurboJPEG supports. More...
  @@ -1739,14 +1739,14 @@ If you choose option 1, *jpegSize should be set to the size of your - -

◆ tjDecompressHeader3()

+ +

◆ tjDecompressHeader4()

- + @@ -1785,7 +1785,13 @@ If you choose option 1, *jpegSize should be set to the size of your - + + + + + + + @@ -1805,6 +1811,7 @@ If you choose option 1, *jpegSize should be set to the size of your +
DLLEXPORT int tjDecompressHeader3 DLLEXPORT int tjDecompressHeader4 ( tjhandle  handle, int * jpegColorspace jpegColorspace,
int * jpegFlags 
heightpointer to an integer variable that will receive the height (in pixels) of the JPEG image. If jpegBuf points to a tables-only datastream, then height is ignored.
jpegSubsamppointer to an integer variable that will receive the level of chrominance subsampling used when the JPEG image was compressed (see Chrominance subsampling options.) If jpegBuf points to a tables-only datastream, then jpegSubsamp is ignored.
jpegColorspacepointer to an integer variable that will receive one of the JPEG colorspace constants, indicating the colorspace of the JPEG image (see JPEG colorspaces.) If jpegBuf points to a tables-only datastream, then jpegColorspace is ignored.
jpegFlagspointer to an integer variable that will receive the bitwise OR of one or more of the flags, such as TJFLAG_PROGRESSIVE and TJFLAG_LOSSLESS, that describe the JPEG image. If jpegBuf points to a tables-only datastream, then jpegFlags is ignored.
diff --git a/doc/html/index.html b/doc/html/index.html index a6f272a3..8d06e0bc 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -23,7 +23,7 @@
TurboJPEG -  2.1.4 +  2.2
diff --git a/doc/html/modules.html b/doc/html/modules.html index d48980a4..f0d4eb56 100644 --- a/doc/html/modules.html +++ b/doc/html/modules.html @@ -23,7 +23,7 @@
TurboJPEG -  2.1.4 +  2.2
diff --git a/doc/html/search/all_6.js b/doc/html/search/all_6.js index 2ac83e75..76dc418b 100644 --- a/doc/html/search/all_6.js +++ b/doc/html/search/all_6.js @@ -22,7 +22,7 @@ var searchData= ['tjdecodeyuv_27',['tjDecodeYUV',['../group___turbo_j_p_e_g.html#ga70abbf38f77a26fd6da8813bef96f695',1,'turbojpeg.h']]], ['tjdecodeyuvplanes_28',['tjDecodeYUVPlanes',['../group___turbo_j_p_e_g.html#ga10e837c07fa9d25770565b237d3898d9',1,'turbojpeg.h']]], ['tjdecompress2_29',['tjDecompress2',['../group___turbo_j_p_e_g.html#gae9eccef8b682a48f43a9117c231ed013',1,'turbojpeg.h']]], - ['tjdecompressheader3_30',['tjDecompressHeader3',['../group___turbo_j_p_e_g.html#ga0595681096bba7199cc6f3533cb25f77',1,'turbojpeg.h']]], + ['tjdecompressheader4_30',['tjDecompressHeader4',['../group___turbo_j_p_e_g.html#gac104e6e729f57f195009405949d198dc',1,'turbojpeg.h']]], ['tjdecompresstoyuv2_31',['tjDecompressToYUV2',['../group___turbo_j_p_e_g.html#ga04d1e839ff9a0860dd1475cff78d3364',1,'turbojpeg.h']]], ['tjdecompresstoyuvplanes_32',['tjDecompressToYUVPlanes',['../group___turbo_j_p_e_g.html#gaa59f901a5258ada5bd0185ad59368540',1,'turbojpeg.h']]], ['tjdestroy_33',['tjDestroy',['../group___turbo_j_p_e_g.html#ga75f355fa27225ba1a4ee392c852394d2',1,'turbojpeg.h']]], @@ -84,7 +84,7 @@ var searchData= ['tjsaveimage_89',['tjSaveImage',['../group___turbo_j_p_e_g.html#ga6f445b22d8933ae4815b3370a538d879',1,'turbojpeg.h']]], ['tjscaled_90',['TJSCALED',['../group___turbo_j_p_e_g.html#ga84878bb65404204743aa18cac02781df',1,'turbojpeg.h']]], ['tjscalingfactor_91',['tjscalingfactor',['../structtjscalingfactor.html',1,'']]], - ['tjtransform_92',['tjtransform',['../structtjtransform.html',1,'tjtransform'],['../group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25',1,'tjTransform(tjhandle handle, const unsigned char *jpegBuf, unsigned long jpegSize, int n, unsigned char **dstBufs, unsigned long *dstSizes, tjtransform *transforms, int flags): turbojpeg.h'],['../group___turbo_j_p_e_g.html#ga504805ec0161f1b505397ca0118bf8fd',1,'tjtransform(): turbojpeg.h']]], + ['tjtransform_92',['tjtransform',['../structtjtransform.html',1,'tjtransform'],['../group___turbo_j_p_e_g.html#ga504805ec0161f1b505397ca0118bf8fd',1,'tjtransform(): turbojpeg.h'],['../group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25',1,'tjTransform(tjhandle handle, const unsigned char *jpegBuf, unsigned long jpegSize, int n, unsigned char **dstBufs, unsigned long *dstSizes, tjtransform *transforms, int flags): turbojpeg.h']]], ['tjxop_93',['TJXOP',['../group___turbo_j_p_e_g.html#ga2de531af4e7e6c4f124908376b354866',1,'turbojpeg.h']]], ['tjxop_5fhflip_94',['TJXOP_HFLIP',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aa0df69776caa30f0fa28e26332d311ce',1,'turbojpeg.h']]], ['tjxop_5fnone_95',['TJXOP_NONE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aad88c0366cd3f7d0eac9d7a3fa1c2c27',1,'turbojpeg.h']]], diff --git a/doc/html/search/functions_0.js b/doc/html/search/functions_0.js index 44071600..e752acb3 100644 --- a/doc/html/search/functions_0.js +++ b/doc/html/search/functions_0.js @@ -9,7 +9,7 @@ var searchData= ['tjdecodeyuv_123',['tjDecodeYUV',['../group___turbo_j_p_e_g.html#ga70abbf38f77a26fd6da8813bef96f695',1,'turbojpeg.h']]], ['tjdecodeyuvplanes_124',['tjDecodeYUVPlanes',['../group___turbo_j_p_e_g.html#ga10e837c07fa9d25770565b237d3898d9',1,'turbojpeg.h']]], ['tjdecompress2_125',['tjDecompress2',['../group___turbo_j_p_e_g.html#gae9eccef8b682a48f43a9117c231ed013',1,'turbojpeg.h']]], - ['tjdecompressheader3_126',['tjDecompressHeader3',['../group___turbo_j_p_e_g.html#ga0595681096bba7199cc6f3533cb25f77',1,'turbojpeg.h']]], + ['tjdecompressheader4_126',['tjDecompressHeader4',['../group___turbo_j_p_e_g.html#gac104e6e729f57f195009405949d198dc',1,'turbojpeg.h']]], ['tjdecompresstoyuv2_127',['tjDecompressToYUV2',['../group___turbo_j_p_e_g.html#ga04d1e839ff9a0860dd1475cff78d3364',1,'turbojpeg.h']]], ['tjdecompresstoyuvplanes_128',['tjDecompressToYUVPlanes',['../group___turbo_j_p_e_g.html#gaa59f901a5258ada5bd0185ad59368540',1,'turbojpeg.h']]], ['tjdestroy_129',['tjDestroy',['../group___turbo_j_p_e_g.html#ga75f355fa27225ba1a4ee392c852394d2',1,'turbojpeg.h']]], diff --git a/doc/html/structtjregion.html b/doc/html/structtjregion.html index 72d49d27..fc398900 100644 --- a/doc/html/structtjregion.html +++ b/doc/html/structtjregion.html @@ -23,7 +23,7 @@
TurboJPEG -  2.1.4 +  2.2
diff --git a/doc/html/structtjscalingfactor.html b/doc/html/structtjscalingfactor.html index 1606a02c..6b8b1ffd 100644 --- a/doc/html/structtjscalingfactor.html +++ b/doc/html/structtjscalingfactor.html @@ -23,7 +23,7 @@
TurboJPEG -  2.1.4 +  2.2
diff --git a/doc/html/structtjtransform.html b/doc/html/structtjtransform.html index ba78980e..c8f10a52 100644 --- a/doc/html/structtjtransform.html +++ b/doc/html/structtjtransform.html @@ -23,7 +23,7 @@
TurboJPEG -  2.1.4 +  2.2
diff --git a/doxygen.config b/doxygen.config index 16708b03..b051aa4c 100644 --- a/doxygen.config +++ b/doxygen.config @@ -1,5 +1,5 @@ PROJECT_NAME = TurboJPEG -PROJECT_NUMBER = 2.1.4 +PROJECT_NUMBER = 2.2 OUTPUT_DIRECTORY = doc/ USE_WINDOWS_ENCODING = NO OPTIMIZE_OUTPUT_FOR_C = YES diff --git a/fuzz/decompress.cc b/fuzz/decompress.cc index c7fcb500..b6604224 100644 --- a/fuzz/decompress.cc +++ b/fuzz/decompress.cc @@ -1,5 +1,5 @@ /* - * Copyright (C)2021 D. R. Commander. All Rights Reserved. + * Copyright (C)2021-2022 D. R. Commander. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -38,7 +38,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { tjhandle handle = NULL; unsigned char *dstBuf = NULL; - int width = 0, height = 0, jpegSubsamp, jpegColorspace, pfi; + int width = 0, height = 0, jpegSubsamp, jpegColorspace, jpegFlags, pfi; /* TJPF_RGB-TJPF_BGR share the same code paths, as do TJPF_RGBX-TJPF_XRGB and TJPF_RGBA-TJPF_ARGB. Thus, the pixel formats below should be the minimum necessary to achieve full coverage. */ @@ -58,8 +58,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) /* We ignore the return value of tjDecompressHeader3(), because some JPEG images may have unusual subsampling configurations that the TurboJPEG API cannot identify but can still decompress. */ - tjDecompressHeader3(handle, data, size, &width, &height, &jpegSubsamp, - &jpegColorspace); + tjDecompressHeader4(handle, data, size, &width, &height, &jpegSubsamp, + &jpegColorspace, &jpegFlags); /* Ignore 0-pixel images and images larger than 1 Megapixel, as Google's OSS-Fuzz target for libjpeg-turbo did. Casting width to (uint64_t) @@ -75,7 +75,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) if (pfi == 0) flags |= TJFLAG_BOTTOMUP | TJFLAG_FASTUPSAMPLE | TJFLAG_FASTDCT; /* Test IDCT scaling on the second iteration. */ - else if (pfi == 1) { + else if (pfi == 1 && !(jpegFlags & TJFLAG_LOSSLESS)) { w = (width + 1) / 2; h = (height + 1) / 2; } diff --git a/fuzz/decompress_yuv.cc b/fuzz/decompress_yuv.cc index d603fd81..4b2c89de 100644 --- a/fuzz/decompress_yuv.cc +++ b/fuzz/decompress_yuv.cc @@ -1,5 +1,5 @@ /* - * Copyright (C)2021 D. R. Commander. All Rights Reserved. + * Copyright (C)2021-2022 D. R. Commander. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -38,7 +38,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { tjhandle handle = NULL; unsigned char *dstBuf = NULL, *yuvBuf = NULL; - int width = 0, height = 0, jpegSubsamp, jpegColorspace, pfi; + int width = 0, height = 0, jpegSubsamp, jpegColorspace, jpegFlags, pfi; /* TJPF_RGB-TJPF_BGR share the same code paths, as do TJPF_RGBX-TJPF_XRGB and TJPF_RGBA-TJPF_ARGB. Thus, the pixel formats below should be the minimum necessary to achieve full coverage. */ @@ -55,8 +55,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) if ((handle = tjInitDecompress()) == NULL) goto bailout; - if (tjDecompressHeader3(handle, data, size, &width, &height, &jpegSubsamp, - &jpegColorspace) < 0) + if (tjDecompressHeader4(handle, data, size, &width, &height, &jpegSubsamp, + &jpegColorspace, &jpegFlags) < 0) goto bailout; /* Ignore 0-pixel images and images larger than 1 Megapixel. Casting width @@ -72,7 +72,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) if (pfi == 0) flags |= TJFLAG_BOTTOMUP | TJFLAG_FASTUPSAMPLE | TJFLAG_FASTDCT; /* Test IDCT scaling on the second iteration. */ - else if (pfi == 1) { + else if (pfi == 1 && !(jpegFlags & TJFLAG_LOSSLESS)) { w = (width + 3) / 4; h = (height + 3) / 4; } diff --git a/java/TJBench.java b/java/TJBench.java index 4084ea54..0cc0f886 100644 --- a/java/TJBench.java +++ b/java/TJBench.java @@ -168,11 +168,16 @@ final class TJBench { TJDecompressor tjd; double elapsed, elapsedDecode; int ps = TJ.getPixelSize(pf), i, iter = 0; - int scaledw = sf.getScaled(w); - int scaledh = sf.getScaled(h); - int pitch = scaledw * ps; + int scaledw, scaledh, pitch; YUVImage yuvImage = null; + if ((flags & TJ.FLAG_LOSSLESS) != 0) + sf = new TJScalingFactor(1, 1); + + scaledw = sf.getScaled(w); + scaledh = sf.getScaled(h); + pitch = scaledw * ps; + if (jpegQual > 0) qualStr = new String("_Q" + jpegQual); @@ -498,7 +503,7 @@ final class TJBench { // Original image int w = 0, h = 0, ntilesw = 1, ntilesh = 1, subsamp = -1, cs = -1; // Transformed image - int tw, th, ttilew, ttileh, tntilesw, tntilesh, tsubsamp; + int tw, th, ttilew, ttileh, tntilesw, tntilesh, tsubsamp, jpegFlags; FileInputStream fis = new FileInputStream(fileName); if (fis.getChannel().size() > (long)Integer.MAX_VALUE) @@ -521,6 +526,10 @@ final class TJBench { h = tjt.getHeight(); subsamp = tjt.getSubsamp(); cs = tjt.getColorspace(); + jpegFlags = tjt.getFlags(); + + if ((jpegFlags & TJ.FLAG_LOSSLESS) != 0) + sf = new TJScalingFactor(1, 1); if (quiet == 1) { System.out.println("All performance values in Mpixels/sec\n"); diff --git a/java/TJExample.java b/java/TJExample.java index 78598869..9e6edd25 100644 --- a/java/TJExample.java +++ b/java/TJExample.java @@ -1,6 +1,6 @@ /* - * Copyright (C)2011-2012, 2014-2015, 2017-2018 D. R. Commander. - * All Rights Reserved. + * Copyright (C)2011-2012, 2014-2015, 2017-2018, 2022 D. R. Commander. + * All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -304,6 +304,10 @@ class TJExample implements TJCustomFilter { height = tjd.getHeight(); int inSubsamp = tjd.getSubsamp(); int inColorspace = tjd.getColorspace(); + int inFlags = tjd.getFlags(); + + if ((inFlags & TJ.FLAG_LOSSLESS) != 0) + scalingFactor = new TJScalingFactor(1, 1); System.out.println((doTransform ? "Transformed" : "Input") + " Image (jpg): " + width + " x " + height + diff --git a/java/doc/index-all.html b/java/doc/index-all.html index eddddc92..54f5807f 100644 --- a/java/doc/index-all.html +++ b/java/doc/index-all.html @@ -316,6 +316,13 @@
Returns a code (one of TJ.ERR_*) indicating the severity of the last error.
+
getFlags() - Method in class org.libjpegturbo.turbojpeg.TJDecompressor
+
+
Returns the bitwise OR of one or more of the + flags, such as + TJ.FLAG_PROGRESSIVE and + TJ.FLAG_LOSSLESS, that describe the JPEG image.
+
getGreenOffset(int) - Static method in class org.libjpegturbo.turbojpeg.TJ
For the given pixel format, returns the number of bytes that the green @@ -462,6 +469,8 @@
 
jpegColorspace - Variable in class org.libjpegturbo.turbojpeg.TJDecompressor
 
+
jpegFlags - Variable in class org.libjpegturbo.turbojpeg.TJDecompressor
+
 
jpegHeight - Variable in class org.libjpegturbo.turbojpeg.TJDecompressor
 
jpegSubsamp - Variable in class org.libjpegturbo.turbojpeg.TJDecompressor
diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html b/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html index 0a0d100c..c27a8abf 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html +++ b/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html @@ -144,17 +144,21 @@ implements java.io.Closeable protected int -jpegHeight  +jpegFlags  protected int -jpegSubsamp  +jpegHeight  protected int -jpegWidth  +jpegSubsamp  +protected int +jpegWidth  + + protected YUVImage yuvImage  @@ -324,25 +328,34 @@ implements java.io.Closeable int +getFlags() +
Returns the bitwise OR of one or more of the + flags, such as + TJ.FLAG_PROGRESSIVE and + TJ.FLAG_LOSSLESS, that describe the JPEG image.
+ + + +int getHeight()
Returns the height of the source image (JPEG or YUV) associated with this decompressor instance.
- + byte[] getJPEGBuf()
Returns the JPEG image buffer associated with this decompressor instance.
- + int getJPEGSize()
Returns the size of the JPEG image (in bytes) associated with this decompressor instance.
- + int getScaledHeight(int desiredWidth, int desiredHeight) @@ -351,7 +364,7 @@ implements java.io.Closeable height.
- + int getScaledWidth(int desiredWidth, int desiredHeight) @@ -360,21 +373,21 @@ implements java.io.Closeable height.
- + int getSubsamp()
Returns the level of chrominance subsampling used in the source image (JPEG or YUV) associated with this decompressor instance.
- + int getWidth()
Returns the width of the source image (JPEG or YUV) associated with this decompressor instance.
- + void setSourceImage(byte[] jpegImage, int imageSize) @@ -383,7 +396,7 @@ implements java.io.Closeable jpegImage with this decompressor instance. - + void setSourceImage(YUVImage srcImage)
Associate the specified YUV planar source image with this decompressor @@ -478,12 +491,21 @@ implements java.io.Closeable - @@ -657,6 +679,21 @@ implements java.io.Closeable with this decompressor instance. + + + + diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJTransformer.html b/java/doc/org/libjpegturbo/turbojpeg/TJTransformer.html index 8bad93f5..69923f33 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/TJTransformer.html +++ b/java/doc/org/libjpegturbo/turbojpeg/TJTransformer.html @@ -125,7 +125,7 @@ extends

Fields inherited from class org.libjpegturbo.turbojpeg.TJDecompressor

-handle, jpegBuf, jpegBufSize, jpegColorspace, jpegHeight, jpegSubsamp, jpegWidth, yuvImage +handle, jpegBuf, jpegBufSize, jpegColorspace, jpegFlags, jpegHeight, jpegSubsamp, jpegWidth, yuvImage @@ -206,7 +206,7 @@ extends

Methods inherited from class org.libjpegturbo.turbojpeg.TJDecompressor

-close, decompress, decompress, decompress, decompress, decompress, decompressToYUV, decompressToYUV, decompressToYUV, finalize, getColorspace, getHeight, getJPEGBuf, getJPEGSize, getScaledHeight, getScaledWidth, getSubsamp, getWidth, setSourceImage, setSourceImage +close, decompress, decompress, decompress, decompress, decompress, decompressToYUV, decompressToYUV, decompressToYUV, finalize, getColorspace, getFlags, getHeight, getJPEGBuf, getJPEGSize, getScaledHeight, getScaledWidth, getSubsamp, getWidth, setSourceImage, setSourceImage