Questions tagged [jai]

The Java Advanced Imaging provides powerful collection of methods for image processing and image analysis for Java.

jai
Filter by
Sorted by
Tagged with
1 vote
2 answers
7k views

How to convert 16 bit Gray Scale image to RGB image in java?

I'm making a desktop app in Java Swing using the Netbeans platform. I want to convert a 16 bit gray scale image to an RGB image. How can I do that?
Jay's user avatar
  • 1,255
0 votes
3 answers
1k views

JVM crashes while image conversion using javax.media.jai

In our app, we use javax.media.JAI library to scale and improve image But sometimes (1 out of 10 times), it is causing the VM to crash # # A fatal error has been detected by the Java Runtime ...
Kamal's user avatar
  • 5,492
0 votes
3 answers
2k views

Uncompress a TIFF file without going through BufferedImage

I am receiving large size CCITT Group 4 compressed TIFF files that need to be written elsewhere as uncompressed TIFF files. I am using the jai_imageio TIFF reader and writer to do that and it works ...
Gert's user avatar
  • 220
5 votes
2 answers
14k views

Get buffered image from byte array of raw data

I am using JNA. and i am getting byte array of raw data from my c++ method. Now i am stuck how to get buffered image in java using this raw data byte array. I had tried few things to get it as tiff ...
Jony's user avatar
  • 1,035
1 vote
3 answers
5k views

Java ImageIO-ext TIF File Corrupt when Read

I am attempting to display a .tif in Java using a minimal number of additional libraries: import javax.imageio.ImageIO; import javax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing....
BenCole's user avatar
  • 2,102
2 votes
1 answer
566 views

How to decide the field marked or not (Optical mark recognition)?

I'm making a java OMR(Optical mark recognition) application that let the user design the template he needs( draw the areas of the marks) then when he scan the document the application use the ...
Amr Adel's user avatar
1 vote
0 answers
666 views

image display lookup table and window width/level

I have a general question about image display's lookup table with window width/level. In my case, we use monochrome display, so there are 256 different pixel values for display on the screen. Our data ...
5YrsLaterDBA's user avatar
1 vote
1 answer
222 views

How to set or install jai plugin on SUSE(Linux)?

I m fresher and making Desktop APP in netbeans platform in Java SE using SWING technology for Windows, Linux, and MAC OS.In this App we use JAI Library,i made App in widows and then want to run on MAC ...
Jay's user avatar
  • 1,255
1 vote
1 answer
250 views

Lookup table in JAI

I am looking at an existing Java CT image display program here. I try to understand how the Lookup Table works in JAI. From the JAI guide, section 7.6, I read this: The input pixel values acts as an ...
5YrsLaterDBA's user avatar
0 votes
1 answer
492 views

Strange top-margin in JPanel with added Image in JLabel

I add some images to a JPanel. Therefore, I add a single image to a JLabel as an ImageIcon and add this to the main JPanel. Although I set the bounds (setBounds) to the image-size, there is a margin ...
didhavn's user avatar
  • 47
3 votes
0 answers
2k views

How to make Histogram Normalize and Equalize in java using JAI library?

I m making App in java using Swing component and JAI library. I make histogram of black and white or gray scale image.Is this method of making histogram correct? iif it is correct then how can i do ...
Jay's user avatar
  • 1,255
0 votes
1 answer
911 views

Java heap space error when creating TIFF image

As I am new to TIFF handling with JAI, I am trying to create an RGB TIFF image of 6000*6000 with float data. Actually the code works for 5000*5000 image but when I increase the size, I am getting a ...
user1321402's user avatar
2 votes
1 answer
3k views

java try to convert planarimage to bufferedimage but colormodel is incompatible

I have a planarimage that I convert to black and white via some example code I found. I then need to convert it into a BufferedImage for the next code section. But I get the following exception: ...
Andrew's user avatar
  • 136
0 votes
1 answer
3k views

How To Plot Histogram of an Image? [closed]

How to plot and display Histogram of an Image ?If it can done using Java Advance Imaging API please suggest me how to do this?
Jony's user avatar
  • 1,035
2 votes
0 answers
444 views

Serializing BufferedImage by Java Advanced Imaging API JAI

I have a BufferedImage object in my hands and I want to serialize this object faster than java imageio by using JAI. However, I could not find any example. Also, I have read the documentation and I ...
Onur Demir's user avatar
1 vote
2 answers
3k views

Reduce JPEG image size without scale its width/height by Java

I want to reduce one jpeg image size(3M reduce to 1M) by Java, without scale(no change for image height and width). IN this site, I could not find a solution. Below is what I have tried: 1 Using ...
shijie xu's user avatar
  • 2,025
0 votes
1 answer
1k views

Rendering TIF image with JAI

I'm trying to render a TIF file using the standard Java APIs, JAI and ImageIO: RenderedOp op = JAI.create("fileload", new File("C:\\test.tif").getAbsolutePath()); or BufferedImage image = ImageIO....
Marcus Dias's user avatar
0 votes
1 answer
3k views

Java Advanced Imaging "PlanarImage" class not found

Let me start by saying I've recently inherited a Java application written using Eclipse. I'm new to this language/IDE, but I have a lot of experience with C# and Visual Studio. So, my problem may be ...
Jake's user avatar
  • 7,684
0 votes
1 answer
795 views

Threads getting blocked while fetching image from url using JAI

I am running a service which starts multiple threads processing images using JAI. Each thread downloads the image from a url and then applies logic on this image. The threads are getting stuck (in ...
Joe's user avatar
  • 1
3 votes
1 answer
3k views

How can I write 16 bit grayscale image as jpeg?

I have 16-bit per pixel grayscale BufferedImage created from an array of shorts: private BufferedImage get16bitImage(short[] pixels) { ColorModel colorModel = new ComponentColorModel( ...
Kcmamu's user avatar
  • 41
1 vote
1 answer
3k views

Android Image editing/warping with Java?

Hopefully not making this too vague... but I have been dealing with a lot of image scaling and manipulating with an app I'm working on and wanted to know: Is it possible/feasible to warp images using ...
Appli-Brad's user avatar
10 votes
6 answers
5k views

Faster alternative to ColorConvertOp

I have a method converting BufferedImages who's type is TYPE_CUSTOM to TYPE_INT_RGB. I am using the following code, however I would really like to find a faster way of doing this. BufferedImage ...
Matt MacLean's user avatar
  • 19.5k
2 votes
3 answers
12k views

Reading TIFF image from file using BufferedImage and JAI

I'm trying to read a TIFF image from file using BufferedImage. The following is my code: String filename = "/image/parrot.tiff"; File f = new File (filename); try{ BufferedImage img = ImageIO....
Kyle Gregorio's user avatar
2 votes
1 answer
2k views

Color Histogram based Image Search

I need to compare images on the basis of color histogram in java. I have Histogram of images which I did using JAI of java. But I don't know how can i compare them using histogram.
Mubasshir Pawle's user avatar
3 votes
4 answers
2k views

Faster performance with TIFF rendering in Java with JAI

I have been working on software that analyzes microscopy data, which is stored as a multilayer tiff file. After looking through StackOverflow and through the JAI documentation, I hobbled together some ...
lord.cookies's user avatar
2 votes
1 answer
5k views

Convert RGB JPEG to CMYK JPEG using ColorConverterOp Java

I am attempting to convert a jpeg image in rgb to CMYK colorspace. The only problem is my final output is always a black image. But interesting enough the preview application in MAC shows the image ...
mtanzania's user avatar
  • 135
1 vote
1 answer
356 views

Using JAI, how do I add a new color to the palette?

I'm using JAI to add a "border" to an image. Eg ParameterBlock pb = new ParameterBlock(); pb.addSource(r); pb.add(leftPad); pb.add(rightPad); pb.add(topPad); pb.add(bottomPad); pb.add(new ...
Plaudit Design's user avatar
0 votes
1 answer
3k views

Printing a .TIF file

I am able to print a .GIF, .JPG or .PNG successfully using the following code snippet but it doesn't work for .TIF file. Also I can't get the color even after adding the chromaticity.color attribute. ...
user1005747's user avatar
2 votes
1 answer
3k views

Error with setCompressionType

Is there someone that can help to correct this code? I'm working with JAI and I'm trying to compress JPG file to Losse-less here's my code `ImageWriter writer= (JPEGImageWriter) ImageIO....
Ran Gualberto's user avatar
2 votes
0 answers
513 views

Get the total width of a string rendered with an arbitrary .ttf font in Java Graphics 2

Currently we attempt to get the width of a string rendered with an arbitrary font. BufferedImage img = new BufferedImage(10, 10, BufferedImage.TRANSLUCENT); img.createGraphics(); Graphics2D g ...
benstpierre's user avatar
  • 33.2k
133 votes
1 answer
63k views

Where can I download Jai and Jai-imageio? [closed]

I need to get the pixel color of a TIFF image, if you know any alternatives to Jai and Jai-imageio please let me know.
Marsellus Wallace's user avatar
1 vote
2 answers
1k views

creating a mosaic with jai

I am trying to create a concatenation of multiple images into one, but have been having problems. To isolate this I have created the following POC which I am trying to solution in order that I ...
Adam Burley's user avatar
  • 5,753
2 votes
1 answer
958 views

Java JAI - creating 1 BIG jpg image from many smaller ones

Before you all say 'thats already on here somewhere...' :-) PLEASE let me say I have looked and not found a simple example of using JAI to tile multiple jpg's and save to disk without java heap errors ...
Sanjay P's user avatar
8 votes
5 answers
19k views

"JRE 1.3 or higher must be installed!" / "JDK 1.3 or higher must be installed!" errors installing JAI 1.1.3 on Windows 7 (x64)

I am getting these errors... Severe: JRE 1.3 or higher must be installed! Severe: JDK 1.3 or higher must be installed! ...when installing JAI (Java Advanced Imaging) 1.1.3 on Windows 7 (x64), with ...
0 votes
1 answer
216 views

Do Java2d or Java Advanced Imaging need to be installed by the end user before they can be used?

I am making a game engine that will run in an applet, that would need to be able to do things like Perspective transform (for Mode 7), basic transforms (drawing an image at custom corner points), etc, ...
eggbertx's user avatar
  • 493
3 votes
1 answer
1k views

How do i apply a PerspectiveTransform to graphics object or image?

I'm trying to draw a square image into a trapezoid using the Java Advanced Imaging API; However after creating a PerspectiveTransform I am unsure how I would go about applying it to a graphics object ...
Jeremy's user avatar
  • 31
14 votes
8 answers
11k views

JAI vendorname == null

So I finished coding my application to rotate TIFF images which required JAI to manipulate the TIFFs. It works fine when working under Eclipse, but whenever I build a fat jar for the library and ...
Robert's user avatar
  • 1,775
5 votes
6 answers
20k views

RenderedImage to BufferedImage for multipage-tiff reading

I am using JAI to load in multipage TIFF images File file = workArea[0]; SeekableStream s = new FileSeekableStream(file); TIFFDecodeParam param = null; ImageDecoder dec = ImageCodec....
Robert's user avatar
  • 1,775
1 vote
1 answer
228 views

JAI Image Adjustment Bottlenecks

I'm using the JAI library to do adjustments on a series of images, each about 1300x1000 in size. I adjust pixel intensities with "Rescale" and add text and lines with the Graphics2D object from the ...
ddukki's user avatar
  • 189
15 votes
4 answers
21k views

Pure Java alternative to JAI ImageIO for detecting CMYK images

first I'd like to explain the situation/requirements that lead to the question: In our web application we can't support CMYK images (JPEG) since IE 8 and below can't display them. Thus we need to ...
Thomas's user avatar
  • 88k
2 votes
2 answers
5k views

JPEG in TIFF encoding

I do this steps: TIFFEncodeParam tep = new TIFFEncodeParam(); tep.setCompression(TIFFEncodeParam.COMPRESSION_JPEG_TTN2); BufferedImage buff = new BufferedImage(newimage.getWidth(null), ...
omisone's user avatar
  • 23
0 votes
1 answer
5k views

java create a TIF file

I've got an awt image (bw) coming from a scanner, I'd like to save it in a TIF file, I tried with JAI but it has a poor documentation so I'm not able to understand some JAI.create parameters. Thx in ...
omisone's user avatar
  • 23
0 votes
1 answer
2k views

jai jpeg2000 encoder not found

I'm using JAI and looking to read and write jpeg2000 files on Mac OS X (Linux soon thereafter) and am having trouble loading the codec. It seems that there are a couple of different projects ...
supertom's user avatar
3 votes
1 answer
937 views

export images to JPEG-XR with java?

Curious to try out exporting BufferedImages to JPEG-XR, but cannot find an export tool to add to a java workflow. Preferably there is a a JAI plugin out there somewhere... I googled about to no ...
jedierikb's user avatar
  • 12.9k
4 votes
1 answer
17k views

How to combine multiple multi-page tif files into a single tif

I am trying to take multiple multi-page .tif files and combine them into a single multi-page tif file. I found some code in this question, but it only seems to take the first page of each individual ....
twilbrand's user avatar
  • 1,350
2 votes
0 answers
839 views

convert from AWT and JAI for android

I have a problem about converting java project to android. What makes me confuse is the equivalent to SampleModel, ColorModel, WritableRaster, and TiledImage for android? Here is the snipped code: ...
amelia's user avatar
  • 21
4 votes
2 answers
671 views

Help on adding plug-in to Java ImageWriter

I am trying to save a BufferedImage as a PNM file. I already installed the JAI (Java Advanced Imaging), and have the PNMWriter plug-in imported. However, I don't know how to add it to my ImageWriter ...
Pedro Cimini's user avatar
0 votes
1 answer
462 views

Java Advanced Imaging GradientMagnitudeDescriptor

I have been reading the API and documentation (http://java.sun.com/products/java-media/jai/forDevelopers/jai1_0_1guide-unc/Analysis.doc.html 9.5 Edge Detection) and have come across the ...
Jack H's user avatar
  • 2,489
1 vote
1 answer
885 views

Getting Image task to work in Ant

I'm trying to utilize the Image task in Ant, which requires Java Advanced Imaging. The .jar file seems to be in the Ant library, but when I try to scale an image, it gives me the following error: ...
jimlamiell's user avatar
6 votes
1 answer
1k views

Is there a native implementation version of Java Advanced imaging api?

Is there a native implementation of the java advanced imaging api? We currently are using the jar files 1-jai_core-1.1.3.jar and 2-jai_codec-1.1.3.jar I have heard there is an implementation of ...
benstpierre's user avatar
  • 33.2k

1
3 4
5
6 7