Hi: I was wondering if anyone could tell me whether or not there is a way of setting the resolution on an output jpeg when using the com.sun.image.codec.* package. I know that this is supposed to be a field in the JFIF header, but none of the Java API's I have seen allow me to set it or use it. If I was able to set it, what effect would it have? A related question is the following: Suppose I had an image that was 146 dpi. Therefore a scan of a 14x17inch chest x-ray would be 2044 by 2482. If I wanted to make that fit in a 72dpi monitor (assume for the sake of argument that the monitor's aspect ratio is the appropriate one, and it's perfectly rectangular), would I do something like this: double XFactor = (72*MONITOR_WIDTH_INCHES)/2044; double YFactor = (72*MONITOR_WIDTH_INCHES)/2482; AffineTransform scaleT = AffineTransform.getScaleInstance(XFactor,YFactor); AffineTransformOp scaleOp = new AffineTransformOp(scaleT,AffineTransformOp.TYPE_BILINEAR); BufferedImage smallImage = scaleOp.filter(bigImage,null); And then simply save it to JPEG? Any help at this point is appreciated Best Regards: -Carlos Best Regards: -Carlos Rodriguez =========================================================================== 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".
