zooming problem

Discussion in 'Java' started by shruti, Oct 12, 2006.

  1. shruti

    shruti Guest

    hello,
    m doing the zooming operation on TIFF file with 1 bit per sample...
    when m applying the zooming operation on tiff image with
    Bit per sample =1
    Image Length = 2200 Pixel
    Image Width = 1700 Pixel
    Resolution(x) = 200 dpi
    Resolution(y) = 200 dpi... then it takes 1 sec to complete the zooming.

    but when i am applying the same code on tiif image with
    Bit per sample =1
    Image Length = 3300 Pixel
    Image Width = 2500 Pixel
    Resolution(x) = 300 dpi
    Resolution(y) = 300 dpi..then i takes 8 to 9 sec to comple the zooming
    operation.

    the code m applyinig is

    RenderedImage src= oriRndImage[selectedButtonIndex];(orirndImage is
    object of 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);
    AffineTranform transAtZoom =
    AffineTransform.getScaleInstance(scaleW,scaleH);
    g.drawRenderedImage(src, transAtZoom);

    is there any solution to speed up the large tiff image??
    it will be gr8 help for me..if one can give me any suggestion....

    Regards,
    Shruti.
     
    shruti, Oct 12, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QUNhdW50ZXI=?=

    Help with image zooming

    =?Utf-8?B?QUNhdW50ZXI=?=, Feb 22, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    373
    =?Utf-8?B?QUNhdW50ZXI=?=
    Feb 22, 2005
  2. =?Utf-8?B?QUNhdW50ZXI=?=

    Image Zooming

    =?Utf-8?B?QUNhdW50ZXI=?=, Feb 22, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    480
    Mark Fitzpatrick
    Feb 22, 2005
  3. Thiago Valverde

    Zooming em java

    Thiago Valverde, Jul 1, 2003, in forum: Java
    Replies:
    1
    Views:
    900
    Rosimildo da Silva
    Jul 1, 2003
  4. Adrian M. Hanslik

    Zooming/streching turtle

    Adrian M. Hanslik, Nov 28, 2004, in forum: Java
    Replies:
    2
    Views:
    367
    Paul van Rossem
    Nov 28, 2004
  5. Peter

    zooming

    Peter, Jul 26, 2004, in forum: HTML
    Replies:
    34
    Views:
    1,608
    Mark Parnell
    Jul 28, 2004
Loading...

Share This Page