![]() |
|
|
| 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 |
|
| There is no answer at this time. |
|
| 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();
}
} |
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 Home - Answers FAQ - Terms of Service - Privacy Policy |