TJCompressor.compress(): Fix lossls buf size calc
This commit is contained in:
@@ -485,6 +485,8 @@ public class TJCompressor implements Closeable {
|
||||
} else {
|
||||
checkSubsampling();
|
||||
int subsamp = get(TJ.PARAM_SUBSAMP);
|
||||
if (get(TJ.PARAM_LOSSLESS) == 1 && subsamp != TJ.SAMP_GRAY)
|
||||
subsamp = TJ.SAMP_444;
|
||||
buf = new byte[TJ.bufSize(srcWidth, srcHeight, subsamp)];
|
||||
}
|
||||
compress(buf);
|
||||
|
||||
Reference in New Issue
Block a user