TMI-80: PCXImageReader now correctly skips rows and applies source region. Re-enabled test in DCXImageReader that earlier failed.

This commit is contained in:
Harald Kuhr
2014-11-04 16:21:42 +01:00
parent 91e693724f
commit 4b00945c9d
3 changed files with 18 additions and 18 deletions

View File

@@ -84,10 +84,4 @@ public class DCXImageReaderTest extends ImageReaderAbstractTestCase<DCXImageRead
"image/dcx", "image/x-dcx"
);
}
@Test
public void testReadWithSourceRegionParamEqualImage() throws IOException {
// Default invocation
assertReadWithSourceRegionParamEqualImage(new Rectangle(0, 0, 32, 32), getTestData().get(0), 0);
}
}

View File

@@ -29,9 +29,11 @@
package com.twelvemonkeys.imageio.plugins.pcx;
import com.twelvemonkeys.imageio.util.ImageReaderAbstractTestCase;
import org.junit.Test;
import javax.imageio.spi.ImageReaderSpi;
import java.awt.*;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
@@ -98,4 +100,11 @@ public class PCXImageReaderTest extends ImageReaderAbstractTestCase<PCXImageRead
"image/pcx", "image/x-pcx"
);
}
@Test
public void testReadWithSourceRegionParamEqualImage() throws IOException {
assertReadWithSourceRegionParamEqualImage(new Rectangle(200, 0, 4, 4), getTestData().get(0), 0);
assertReadWithSourceRegionParamEqualImage(new Rectangle(100, 100, 4, 4), getTestData().get(0), 0);
assertReadWithSourceRegionParamEqualImage(new Rectangle(0, 200, 4, 4), getTestData().get(0), 0);
}
}