Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #3080
| From | "RedGrittyBrick" <redgrittybrick@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: Creating image thumbn |
| Message-ID | <DcqdnUO9pfwRpwbanZ2dnUVZ8hednZ2d@bt.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <bill-A6EC28.06533726012008@sn-ip.vsrv-sjc.supernews.net> |
| Date | 2011-04-27 15:42 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui Bill wrote: > My java application is given a list of image files. For each image, > it creates an image thumbnail and displays this thumbnail in a > separate JFrame. The creation of these thumbnails is very slow > compared to the Mac Preview application. Is there a way to speed > this up? When optimising, I'd first find out what part of your program is slow - instrument it and/or profile it or benchmark it. > Each thumbnail is displayed in a separate JFrame to allow the > thumbnails to be dragged and repositioned on the screen > independently. To me that seems a bit unnecessary. I imagine it would be a great deal faster to do your own 2d rendering. That way you're avoid instantiating lots of JFrames. > Each thumbnail is converted to an ImageIcon and displayed in a > JButton. Clicking on the button will rotate the image 90 degrees. > > Here is the method which creates the JFrame. I'd appreciate any > suggestions how I can improve performance speed. I believe a lot of similar applications cache the thumbnails in memory and some save the thumbnails to disk - reading a thumbnail from disk has to be faster than reading a large image and then resizing it. --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Creating image thumbnails "Bill" <bill@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000 Re: Creating image thumbn "RedGrittyBrick" <redgrittybrick@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000 Re: Creating image thumbn "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000
csiph-web