ranges.add(new Range(first, first + length - 1, stride));
} catch (InvalidRangeException e) {
// TODO LOGME
}
}
final Section sections = new Section(ranges);
/*
* Setting SampleModel and ColorModel.
*/
final SampleModel sampleModel = wrapper.getSampleModel().createCompatibleSampleModel(destWidth, destHeight);