If a scaled-down JPEG output image is requested, we must decompress and recompress the transformed image.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@513 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
@@ -220,7 +220,7 @@ public class TJExample {
|
||||
if(outSubsamp < 0) outSubsamp = inSubsamp;
|
||||
|
||||
if(outFormat.equalsIgnoreCase("jpg") && (xform.op != TJ.XFORM_NONE
|
||||
|| xform.options != 0)) {
|
||||
|| xform.options != 0) && (scaleNum == 1 && scaleDenom == 1)) {
|
||||
file = new File(argv[1]);
|
||||
FileOutputStream fos = new FileOutputStream(file);
|
||||
fos.write(tjd.getJPEGBuf(), 0, tjd.getJPEGSize());
|
||||
|
||||
Reference in New Issue
Block a user