hello,
m doing zooming operation on tiff image.
when i applied zoom in operation on image which have properties
Bit per sample =1
Image Length = 2200 Pixel
Image Width = 1700 Pixel
Resolution(x) = 200 dpi
Resolution(y) = 200 dpi
then it require 2 sec.
then i apply the same code with diff image which have properties like,
Bit per sample =1
Image Length = 3300 Pixel
Image Width = 2500 Pixel
Resolution(x) = 300 dpi
Resolution(y) = 300 dpi
then it require 9 to 10 sec.
my code is:
RenderedImage src= oriRndImage[selectedButtonIndex];(orirndImage is Rendered
Iamge)
//Transfer Current RenderedImage object into BufferedImage object
Raster ra= currRimage.getData(); //it take time.
DataBuffer db = ra.getDataBuffer();
SampleModel sa = ra.getSampleModel();
ColorModel cm = currRimage.getColorModel();
final BufferedImage currImage = new
BufferedImage(cm,Raster.createWritableRaster(sa,db,null), false, new
Hashtable());
//Create new Bufferred Image
BufferedImage bi = new BufferedImage(zoomW,zoomH, BufferedImage.TYPE_INT_RGB);
Graphics2D g = bi.createGraphics();
double scaleW = (double)(zoomW)/(double)(prev_width);
double scaleH = (double)(zoomH)/(double)(prev_height);
transAtZoom = AffineTransform.getScaleInstance(scaleW,scaleH);
g.drawRenderedImage(src, transAtZoom);
can any one tell me that image properties affect the speed.?
how to handle this problem?
Regards,
sonal
===========================================================================
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".