mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-03 03:25:28 -04:00
Merge branch 'master' of github.com:haraldk/TwelveMonkeys
This commit is contained in:
commit
25f7c6f695
@ -634,10 +634,14 @@ public class TIFFImageReader extends ImageReaderBase {
|
||||
: new LittleEndianDataInputStream(adapter);
|
||||
}
|
||||
|
||||
// Read a full strip/tile
|
||||
Raster clippedRow = clipRowToRect(rowRaster, srcRegion,
|
||||
// Clip the stripTile rowRaster to not exceed the srcRegion
|
||||
Rectangle clip = new Rectangle(srcRegion);
|
||||
clip.width = Math.min((colsInTile + xSub - 1) / xSub, srcRegion.width);
|
||||
Raster clippedRow = clipRowToRect(rowRaster, clip,
|
||||
param != null ? param.getSourceBands() : null,
|
||||
param != null ? param.getSourceXSubsampling() : 1);
|
||||
|
||||
// Read a full strip/tile
|
||||
readStripTileData(clippedRow, srcRegion, xSub, ySub, numBands, interpretation, destRaster, col, row, colsInTile, rowsInTile, input);
|
||||
|
||||
if (abortRequested()) {
|
||||
|
@ -68,7 +68,8 @@ public class TIFFImageReaderTest extends ImageReaderAbstractTestCase<TIFFImageRe
|
||||
new TestData(getClassLoaderResource("/tiff/quad-jpeg.tif"), new Dimension(512, 384)), // YCbCr, JPEG compressed, striped
|
||||
new TestData(getClassLoaderResource("/tiff/smallliz.tif"), new Dimension(160, 160)), // YCbCr, Old-Style JPEG compressed (full JFIF stream)
|
||||
new TestData(getClassLoaderResource("/tiff/zackthecat.tif"), new Dimension(234, 213)), // YCbCr, Old-Style JPEG compressed (tables, no JFIF stream)
|
||||
new TestData(getClassLoaderResource("/tiff/test-single-gray-compression-type-2.tiff"), new Dimension(1728, 1146)) // Gray, CCITT type 2 compressed
|
||||
new TestData(getClassLoaderResource("/tiff/test-single-gray-compression-type-2.tiff"), new Dimension(1728, 1146)), // Gray, CCITT type 2 compressed
|
||||
new TestData(getClassLoaderResource("/tiff/cramps-tile.tif"), new Dimension(800, 607)) // Gray/WhiteIsZero, uncompressed, striped & tiled...
|
||||
);
|
||||
}
|
||||
|
||||
|
BIN
imageio/imageio-tiff/src/test/resources/tiff/cramps-tile.tif
Normal file
BIN
imageio/imageio-tiff/src/test/resources/tiff/cramps-tile.tif
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user