Fix build broken by r1349

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1351 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
DRC
2014-08-15 14:40:36 +00:00
parent efd7674c11
commit 0c28bca095

View File

@@ -119,15 +119,15 @@ public class TJTransformer extends TJDecompressor {
public TJDecompressor[] transform(TJTransform[] transforms, int flags)
throws Exception {
byte[][] dstBufs = new byte[transforms.length][];
if (srcWidth < 1 || srcHeight < 1)
if (jpegWidth < 1 || jpegHeight < 1)
throw new Exception("JPEG buffer not initialized");
for (int i = 0; i < transforms.length; i++) {
int w = srcWidth, h = srcHeight;
int w = jpegWidth, h = jpegHeight;
if ((transforms[i].options & TJTransform.OPT_CROP) != 0) {
if (transforms[i].width != 0) w = transforms[i].width;
if (transforms[i].height != 0) h = transforms[i].height;
}
dstBufs[i] = new byte[TJ.bufSize(w, h, srcSubsamp)];
dstBufs[i] = new byte[TJ.bufSize(w, h, jpegSubsamp)];
}
TJDecompressor[] tjd = new TJDecompressor[transforms.length];
transform(dstBufs, transforms, flags);