Merge branch 'main' into dev

This commit is contained in:
DRC
2023-01-17 18:31:31 -06:00
5 changed files with 37 additions and 32 deletions

View File

@@ -398,7 +398,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)
@@ -681,7 +681,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)