Welcome to Dream.In.Code
Become a Java Expert!

Join 150,182 Java Programmers for FREE! Get instant access to thousands of Java experts, tutorials, code snippets, and more! There are 2,111 people online right now. Registration is fast and FREE... Join Now!




Tiff file Dimensions with JAI?

 
Reply to this topicStart new topic

Tiff file Dimensions with JAI?

joneSi
28 Aug, 2008 - 06:59 AM
Post #1

New D.I.C Head
*

Joined: 21 Aug, 2008
Posts: 6

All,

I am trying to write a quick program that will check the dimensions of a tiff file. I have a quick program (picked up from elsewhere on the Internet) however, I am unable to use this with tiff files.

CODE

import javax.swing.*;
import java.awt.*;

public class JRenderImage{
public static void main(String args[]) {
Image img = new ImageIcon("te.tiff").getImage();
System.out.println(img.getWidth(null) + " x " + img.getHeight(null));
}
}


I have looked into using JAI (java advanced imaging), but I can't seem to import any of the packages that I need. Any help would be appreciated.

Steve

edit: I should have been more clear. I am looking for the dimensions in Pixels or Inches or whatever of the image itself.THX

This post has been edited by joneSi: 28 Aug, 2008 - 07:44 AM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 03:52AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Java Help!

Java Tutorials

Reference Sheets

Java Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month