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:
DRC
2023-01-17 18:18:27 -06:00
parent 08cbc23334
commit 7ed186ed79

View File

@@ -393,7 +393,7 @@ public class TJDecompressor implements Closeable {
int pitch, int desiredHeight, int pixelFormat,
int flags) throws TJException {
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 ||
(yuvImage != null && (desiredWidth < 0 || desiredHeight < 0)) ||
pixelFormat < 0 || pixelFormat >= TJ.NUMPF || flags < 0)
@@ -715,7 +715,7 @@ public class TJDecompressor implements Closeable {
int stride, int desiredHeight, int pixelFormat,
int flags) throws TJException {
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 ||
(yuvImage != null && (desiredWidth < 0 || desiredHeight < 0)) ||
pixelFormat < 0 || pixelFormat >= TJ.NUMPF || flags < 0)