-
Get image's width and height faster
Hi,
I have problem how to get image's width and height (represented by file.jpg) faster.
Using BufferedImage's getWidth() or getHeight() methods is very slow cause I have to read the whole image via ImageIO.read().
Is there a way how to get image's height and width much faster ?
Thank you for your advices.
-
I hope this helps:
Toolkit tk=Toolkit.getDefaultToolkit();
IMG=tk.getImage(".\\background.jpg");
MediaTracker mt = new MediaTracker(this);
mt.addImage(IMG,0);
try{
mt.waitForAll();
}catch(InterruptedException e)
{System.out.println(e.getMessage());};
//now IMG.getWidth, IMG.getHeight see documentation of java.awt.Image class
Similar Threads
-
Replies: 1
Last Post: 02-05-2003, 12:08 PM
-
By Adam Right in forum ASP.NET
Replies: 1
Last Post: 01-25-2002, 11:11 AM
-
By Shiva Prasad in forum VB Classic
Replies: 14
Last Post: 01-09-2002, 06:03 PM
-
By Shiva Prasad in forum VB Classic
Replies: 0
Last Post: 01-09-2002, 07:43 AM
-
By Sunil in forum VB Classic
Replies: 4
Last Post: 08-14-2000, 07:40 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|