On JDK 1.4.1, both Windoze and Linux, the following code:
double aScaleFactor = ((double) finalSize) / aSourceSize;
AffineTransform aScaleTransform = AffineTransform.getScaleInstance(aScaleFactor, aScaleFactor);
AffineTransformOp aScaleOp = new AffineTransformOp(aScaleTransform, anInterpolationType);
Rectangle aDestinationRegion = aScaleOp.getBounds2D(sourceImage).getBounds();
aScaleOp.filter(sourceImage, destinationBuffer); scaleIntoSubimage = destinationBuffer.getSubimage( aDestinationRegion.x, aDestinationRegion.y, aDestinationRegion.width, aDestinationRegion.height);
... works as expected, except that sometimes the last row (row of largest y) does not get written into so the pixels are all 0.
Is this a bug in the JDK? Some type of rounding error?
thanks for any pointers.
joe
_________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail
=========================================================================== 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".
