Problem wirth MultiplyConst operation
I am applying "MultiplyConst" operation. My input image is of 8 bit. After multiplying by a constant the resultant image pixels have values greater than 255, so I want resultant Image in 16 bit. However, it is mentioned that "by default, the destination image bound, data type, and number of bands are the same as the source image". My source Image is of 8 bit, but I want my destination Image in 16 bit. Please advise my how to that ?
My code is:
ParameterBlock pb2 = new ParameterBlock();
pb2.addSource(image1); // The source image
PlanerImage image2=JAI.create("MultiplyConst", pb2);
Here, image1 is of 8 bit. But the Constant by which I am multiplying the image is high so I want image2 is of 16 bit, however, at the movement this operation is clamping the pixel values in between 0 to 255. Please advise me what to do to change bound of destination image.
Thanks in advance !