if((serverMask & SERVER_JPEG_FULL) != SERVER_JPEG_FULL &&
(serverMask & SERVER_FPX_FULL) != SERVER_FPX_FULL) {
if((opMask & MASK_ROTATION) != 0) {
// NOTE: The transpose operation uses clockwise rotation
// whereas this operation expects counterclockwise.
EnumeratedParameter transposeType = null;
switch(paramBlock.getIntParameter(9)) {
case 90:
transposeType = TransposeDescriptor.ROTATE_270;
break;
case 180:
transposeType = TransposeDescriptor.ROTATE_180;
break;
case 270:
transposeType = TransposeDescriptor.ROTATE_90;
break;
}
if(transposeType != null) { // deliberately redundant test
rendering =
JAI.create("transpose", rendering, transposeType);
}
}
if((opMask & MASK_MIRROR_AXIS) != 0) {
String axis = (String)paramBlock.getObjectParameter(10);
EnumeratedParameter transposeType =
axis.equalsIgnoreCase("x") ?
TransposeDescriptor.FLIP_VERTICAL :
TransposeDescriptor.FLIP_HORIZONTAL;
rendering = JAI.create("transpose", rendering, transposeType);
}