int cCroppedHeight = cHeightReduce *
(imageInput.getHeight() / cHeightReduce);
int cTotalWidth = dRight - dLeft;
Gray8Crop crop = new Gray8Crop(dLeft, 0, cTotalWidth, cCroppedHeight);
Sequence seq = new Sequence(crop);
seq.add(new Gray8Reduce(1,cHeightReduce));
int cReducedHeight = cCroppedHeight / cHeightReduce;
// we stretch the cropped image so cInputWidth becomes cTargetWidth. This means
// cTotalWidth must become cTargetWidth * cTotalWidth / cInputWidth
Gray8RectStretch stretch = new Gray8RectStretch(
cTargetWidth * cTotalWidth / cInputWidth, cReducedHeight);