-
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks