java image loading with effects
I wanted to load java images with 开发者_Go百科some effects like we have in power point like blinds or appear in Java swing when user clicks on the image.
I have these specific questions in mind: 1.Is there a way to do this in Java? 2.Also how will this behave when the image to load is huge like 25 Mega Pixel? 3.If we are dealing with large images being switched, what mechanism should be used for incorporating images in the application?Thanks, Sandeep
1.Is there a way to do this in Java?
Yes, but it won't be with a single command or anything like that. Unless you find a library for this, you'll have to code it up manually.
To do animations like these I suggest you have a look at SwingWorkers.
2.Also how will this behave when the image to load is huge like 25 Mega Pixel?
25 mega pixel is quite large. It depends on your computer of course but if you code it reasonable well it should work fine.
3.If we are dealing with large images being switched, what mechanism should be used for incorporating images in the application?
Unless you really want the program to zoom into the details of the image, I suggest you shrink them immediately after loading, so your drawing-routines can work with them efficiently.
You can experiment with your target images using ImageJ. I routinely use it to manipulate images having scores of megapixels containing 8-, 16- and 32-bit data.
精彩评论