Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / October 2006

Tip: Looking for answers? Try searching our database.

Problem with zooming on 1 bit TIFF  File

Thread view: 
shruti - 12 Oct 2006 13:51 GMT
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.
TestMan - 31 Oct 2006 07:56 GMT
shruti a écrit :
> hello,
> m doing the zooming operation on TIFF file with 1 bit per sample...
[quoted text clipped - 43 lines]
> Regards,
> Shruti.

Hi,

Did you tried with bi.getScaledInstance(scaleW,scaleH, Image.SCALE_FAST)
and drawing the zommed image at the right location ?

Rgs,
TM


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.