mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-05 04:25:29 -04:00
Fix reading jpeg images where last scanline is higher than the y
source subsampling offset.
This commit is contained in:
parent
1e03850960
commit
0a7f250566
@ -445,6 +445,10 @@ public class JPEGImageReader extends ImageReaderBase {
|
|||||||
for (int y = srcRegion.y; y < srcMaxY; y += step) {
|
for (int y = srcRegion.y; y < srcMaxY; y += step) {
|
||||||
int scan = Math.min(step, srcMaxY - y);
|
int scan = Math.min(step, srcMaxY - y);
|
||||||
|
|
||||||
|
if(scan <= param.getSubsamplingYOffset()) {
|
||||||
|
param.setSourceSubsampling(param.getSourceXSubsampling(),param.getSourceYSubsampling(),param.getSubsamplingXOffset(),0);
|
||||||
|
}
|
||||||
|
|
||||||
// Let the progress delegator handle progress, using corrected range
|
// Let the progress delegator handle progress, using corrected range
|
||||||
progressDelegator.updateProgressRange(100f * (y + scan) / srcRegion.height);
|
progressDelegator.updateProgressRange(100f * (y + scan) / srcRegion.height);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user