Google Answers Logo
View Question
 
Q: Opening Tiff images using Java advanced imaging ( No Answer,   1 Comment )
Question  
Subject: Opening Tiff images using Java advanced imaging
Category: Computers > Programming
Asked by: ahroon-ga
List Price: $10.00
Posted: 17 May 2004 00:56 PDT
Expires: 21 May 2004 10:12 PDT
Question ID: 347437
Hi,
      Can anyone provide a fully functional code to open and display a
tiff file in java or using java advanced imaging.Fully functional with
no errors.I am not looking for open source software to open the
images.Just java code .
John
Answer  
There is no answer at this time.

Comments  
Subject: Re: Opening Tiff images using Java advanced imaging
From: kaif-ga on 18 May 2004 22:11 PDT
 
This is by no means a complete answer.

Does the following code work for all image types?

Hope it helps.  If not, sorry.

========== SimpleJAITest.java ==========
import javax.media.jai.*;
import javax.media.jai.widget.*;
import javax.swing.*;

/** Sample program that loads an image and displays it. */

public class SimpleJAITest
{
    public static void main(String argv[])
    {
        ParameterBlockJAI loadPB;
        RenderedOp loadImage;

        JFrame window;
        ScrollingImagePanel panel;

        // Create input image by reading argv[0]

        loadPB = new ParameterBlockJAI("fileload");
        loadPB.set(argv[0], "filename");
        loadImage = JAI.create("fileload", loadPB);

        // Display the original image

        window = new JFrame("original: " + argv[0]);
        panel  = new ScrollingImagePanel(loadImage, 300, 300);
        window.getContentPane().add(panel);
        window.pack();
        window.show();
    }
}

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy