TJDecompressor.java: Exception message tweak
NO_ASSOC_ERROR is specific to JPEG source images, but the decompress() methods can handle YUV source images as well.
This commit is contained in:
@@ -393,7 +393,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
int pitch, int desiredHeight, int pixelFormat,
|
int pitch, int desiredHeight, int pixelFormat,
|
||||||
int flags) throws TJException {
|
int flags) throws TJException {
|
||||||
if (jpegBuf == null && yuvImage == null)
|
if (jpegBuf == null && yuvImage == null)
|
||||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
throw new IllegalStateException("No source image is associated with this instance");
|
||||||
if (dstBuf == null || x < 0 || y < 0 || pitch < 0 ||
|
if (dstBuf == null || x < 0 || y < 0 || pitch < 0 ||
|
||||||
(yuvImage != null && (desiredWidth < 0 || desiredHeight < 0)) ||
|
(yuvImage != null && (desiredWidth < 0 || desiredHeight < 0)) ||
|
||||||
pixelFormat < 0 || pixelFormat >= TJ.NUMPF || flags < 0)
|
pixelFormat < 0 || pixelFormat >= TJ.NUMPF || flags < 0)
|
||||||
@@ -715,7 +715,7 @@ public class TJDecompressor implements Closeable {
|
|||||||
int stride, int desiredHeight, int pixelFormat,
|
int stride, int desiredHeight, int pixelFormat,
|
||||||
int flags) throws TJException {
|
int flags) throws TJException {
|
||||||
if (jpegBuf == null && yuvImage == null)
|
if (jpegBuf == null && yuvImage == null)
|
||||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
throw new IllegalStateException("No source image is associated with this instance");
|
||||||
if (dstBuf == null || x < 0 || y < 0 || stride < 0 ||
|
if (dstBuf == null || x < 0 || y < 0 || stride < 0 ||
|
||||||
(yuvImage != null && (desiredWidth < 0 || desiredHeight < 0)) ||
|
(yuvImage != null && (desiredWidth < 0 || desiredHeight < 0)) ||
|
||||||
pixelFormat < 0 || pixelFormat >= TJ.NUMPF || flags < 0)
|
pixelFormat < 0 || pixelFormat >= TJ.NUMPF || flags < 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user