Hi there,
I'm having problems converting a simple PNG into a JPEG format.
I'm using the following code:
...
File png = new File(filePath);
try {
SeekableStream s = new FileSeekableStream(png);
PNGDecodeParam pngParams = new PNGDecodeParam();
ImageDecoder dec = ImageCodec.createImageDecoder("png", s, png...
I have a set of images that I'm combining into a single image mosaic using JAI's MosaicDescriptor.
Most of the images are the same size, but some are smaller. I'd like to fill in the missing space with white - by default, the MosaicDescriptor is using black. I tried setting the the double[] background parameter to { 255 }, and that fill...
For the needs of my program I have created a facility to distort an image and place it on a map (my program is a map based program).
I wrote my own mechanism for placing and distorting the image using three points that are placed on the image, three points that are placed on the map and then what I simply do it create an AffineTransfor...
I have an application that uses JAI to process images. It takes TIFF files, reads them, wraps the content into a SeekableStream then uses JAI.create to create the PlanarImage.
What I want to do is change the source from TIFF files to a component, which already exists, and which serves me the image data in the form of a raster stored in ...
hi
i want to write a mapviewer, i must to work small tile of big map image file and there is need to tiling the big image, the problem now is to tiling big image to small tiles (250 * 250 pixel or like this size)
so on, i used ImageMagic program to do it but there was problem
now is any other programing method or application that do til...
Hello
I'm trying to use JAI to create a single mosaic consisting of 4 TIF images each of which is 5000 x 5000. The code I have written is as follows ..
RenderedOp mosaic=null;
ParameterBlock pbMosaic=new ParameterBlock();
pbMosaic.add(MosaicDescriptor.MOSAIC_TYPE_OVERLAY);
RenderedOp in=null;
// Get 4 tiles and add ...
Hi:
However I found that some geotiff image can be displayed in a JFrame,however others can not.
The core codes:
PlanarImage resultImage = null;
InputStream is = null;
try {
is = new FileInputStream(new File("D:/wu.tif"));
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
...
I am trying to use JAI to perform a rotate task on an image. I can get this working no problem. However, there is severe loss of midtones in the image. The image can be rotated in photoshop without this lack of contrast.
Please see the following 3 images stacked next to each other here, to see what I mean;
http://imgur.com/SYPhZ.jpg
T...
I'm trying to use the following import in Eclipse running on Mac OS X 10.6:
import javax.media.jai.JAI;
Unfortunately, this doesn't work, instead I get the following message:
"Access restriction: The type JAI is not accessible due to restriction on required library /System/Library/Java/Extensions/jai_core.jar"
How can this be resolv...
I'm using a class (DisplayContainer) to hold a RenderedOp-image that should be displayed to the user:
RenderedOp image1 = JAI.create("tiff", params);
DisplayContainer d = new DisplayContainer(image1);
JScrollPane jsp = new JScrollPane(d);
// Create a frame to contain the panel.
Frame window = new Frame();
window.add(jsp);
window.pack()...
Hello Friends!
I have 5 single page tiff images.
I want to combine all these 5 tiff images in to one multipage tiff image.
I am using Java Advanced Imaging API.
I have read the JAI API documentation and tutorials given by SUN.
I am new to JAI. I know the basic core java.
I dont understand those documentation and turorial by SUN.
So f...
Hello,
I first made a simple java app to convert an image to user desired format using JAI.
eg. the code to convert to jpeg format is:-
outputFile="C:\\eclipse\\" + outputFile + ".bmp";
// Load the input image.
RenderedOp src = JAI.create("fileload", inputFile);
// Encode the file as a BMP image.
OutputStream o...
When I install native JAI I get black lines in my scaled images. Does anyone know how to avoid this?
ParameterBlockJAI pb = new ParameterBlockJAI("scale");
pb.addSource(image);
pb.setParameter("xScale", (float) from.getScale());
pb.setParameter("yScale", (fl...
Hi,
I want to resize a .tiff file. I have used JAI toolkit to resize different types of images. Here is what I have tried to implement:
int imageWidth = 330;
int imageHeight = 490;
BufferedImage tempImage = new BufferedImage(imageWidth, imageHeight,BufferedImage.TYPE_INT_RGB);
Graphics2D graphics2D = tempImage....
I am working on a Java application that uses a USB ImagingSource camera. I get the following error when a function using the camera is opened:
java.lang.NoClassDefFoundError: Could not initialize class javax.media.jai.JAI
The searching I've done suggests it may have to do with having multiple instances of the same library open. Looki...
I'm brand new to Java Advanced Imaging, and the first stumbling block I've reached is the ability to read in a 12 bit, single band, greyscale JPEG file. I've seen references to it being possible with JAI, but no code or even suggestions about how it should be done. Could someone please help me out with either a helpful link or a short co...
I want to write a simple Java application to display a portion of large stitched tiles of TIFF images. I want to be able to zoom and move around.
Is using JAI the best current way to go? The documentation seems awfully out-of-date.
I found this sample program to display a TIFF image. But how can I zoom into a TIFF image? And is it poss...
I would like develop program with a lot of image processing. I would like to use Java, and JAI, but it seems to me, that Jai is old and no longer evolve? (http://java.sun.com/javase/technologies/desktop/media/jai/)
I wonder, is it better choice to use QT and c++?
Two main pros which I am looking for is: cross platform code and good le...
Have been trying to convert ImageOutputStream to byte[] for a while using JAI. Any inputs are appreciated. Thanks.
Sorry here is the code snippet, I am working on. I had to post it earlier. The problem I am facing is that, I am able to get ByteArrayOutputStream from ImageOutputStream. But it always gives me zero bytes. But if I use a Fi...
JAI's Histogram class has a method called "getMinErrorThreshold" that corresponds to some known algorithm. I would like to implement this algorithm in C given a Histogram object of my own and have failed to find sample pseudocode or code that implements this algorithm (or even a detailed description of how the algorithm computes the thr...