RenderedOp src = JAI.create("fileload", inputFile);
int src_w = src.getWidth();
int src_h = src.getHeight(); // now gotta figure out how to scale based on the pixel
width passed in.
double scale;
if(maxW > 0){
scale = (double)maxW/(double)src_w;
}
else{
scale = (double)maxH/(double)src_h;
} ParameterBlock pb = new ParameterBlock();
pb.addSource(src); // The source image
pb.add((float)scale); // The xScale
pb.add((float)scale); // The yScale
pb.add(0.0F); // The x translation
pb.add(0.0F); // The y translationpb.add(Interpolation.getInstance(Interpolation.INTERP_BICUBIC)); //new InterpolationBicubic(4)); //;
// Create the scale operation
RenderedOp im = JAI.create("scale", pb, null);
Is there anyway to make the scaled picture (making it smaller) look clearer? The image quality just gets terrible after scaling.
Travis
=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
