Questions tagged [jai]

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

The Java Advanced Imaging API (JAI) provides a set of object-oriented interfaces that supports a simple, high-level programming model which allows images to be manipulated easily in Java applications and applets. JAI goes beyond the functionality of traditional imaging APIs to provide a high-performance, platform- independent, extensible image processing framework.

See Also - Java Advanced Imaging

310 questions
0
votes
1 answer

`java.lang.ClassNotFoundException: javax.media.jai.ImageLayout` error

I was running a geoscript-groovy tutorial code: groovy:000> import geoscript.layer.GeoTIFF groovy:000> format = new GeoTIFF() groovy:000> raster = format.read(new File("raster.tif")) , and got the follow errors: ERROR…
thor
  • 21,418
  • 31
  • 87
  • 173
0
votes
1 answer

How do I write a modified image with the same compression settings as the source image

The use case I'm investigating is to read a an input image (tif), modify it and write it to an output image (tif) . I'm looking for a convenient way to ensure that the writer uses the same compression settings etc as the original image. I haven't…
Vinay B
  • 673
  • 8
  • 21
0
votes
1 answer

Error while converting .dcm to jpeg of type jpeg-lossless

I am stuck in 1.2.840.10008.1.2.4.70 - JPEG Lossless, Non-Hierarchical, First-Order Prediction while converting DCM to jpg using ImageIo. I have installed JAI ImageIO as instructed here, and ImageIO.getReaderFormatNames() is giving raw jpeg tif JFIF…
Dharmraj
  • 164
  • 1
  • 15
0
votes
1 answer

How can I create a JAI PlanarImage from a byte array raster?

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,…
Andrei Vajna II
  • 4,642
  • 5
  • 35
  • 38
0
votes
0 answers

Getting java.lang.ClassNotFoundException: javax.media.jai.ParameterBlockJAI exception

I am really stuck at this exception from 3 days. It was working fine but suddenly it is throwing this exception. I am trying to upload an image for cleaning from my android device to JAVA servlet in jboss which is like this : Class Servlet extends…
user1901079
  • 427
  • 2
  • 7
  • 19
0
votes
0 answers

using JAI Imageio exception because of (vendorname = null) while running executable jar, working fine in eclipse

using JAIImageio library, getting exception because of (vendorname = null) while running executable jar, working fine in eclipse. tried all the available links but not…
mannu
  • 43
  • 1
  • 9
0
votes
1 answer

is there any other way of converting tiff into jpg without using JAI or JAIImageIO

i am not able to add jai libraries in jdk. i have already set everythig on correct position. I need to read tiff image. But that is not working so i tried for converting tiff file into JPEG. but still getting same error. classpath set. Everything…
user23385
  • 111
  • 2
  • 12
0
votes
0 answers

i am not able to read tiff images

Here is my code. I am pasting an image over another image. This is working fine for .gif and .jpg but getting Null Pointer Exception for reading tiff images. import java.awt.*; import java.awt.image.*; import java.io.*; import…
user23385
  • 111
  • 2
  • 12
0
votes
1 answer

bad output(monocolor) with Java Advanced Imaging api

I m having a sample image(sorry for the type of image) which i m feeding into JAI code to get a compressed image. Now the output image i m getting is in mono-color. I don't know why is the output is abnormal but other images are getting processed…
Pradyut Bhattacharya
  • 5,440
  • 13
  • 53
  • 83
0
votes
1 answer

TIFF to BufferedImage - JAI on eclipse for Mac

I've searched everywhere and am thoroughly confused. Trying to read a TIFF file in as a BufferedImage. I've imported both: import javax.imageio.ImageIO; import javax.media.jai.*; However, my BufferedImage types are still reading as null when the…
Gil
  • 370
  • 2
  • 11
0
votes
0 answers

Compress GIF images using JAI

I am compressing the images using JAI (image-io). when i do for GIF image, sometime compression GIF image size more than original image. BufferedImage image = ImageIO.read(fileObject); File compressedImageFile = new…
Gnaniyar Zubair
  • 8,114
  • 23
  • 61
  • 72
0
votes
0 answers

How to specify Specification-Title without creating jar

When running the test phase my tests fail to the JAI requirement for the code to be run from inside a jar file that contains Specification-Title in the manifest. Unfortunately mvn test and intellij debug do not build a a jar file (obviously) and so…
James Robinson
  • 1,222
  • 1
  • 15
  • 43
0
votes
0 answers

java jai allocate huge size of byte array

I'm using JAI(Java Advanced Image Processing) library. I try to read one image as BufferedImage using jai. jai allocate huge size of byte array to read the image. jai using about 1.5GB memory although the image size is only about 1.5MB. i don't know…
SHRIN
  • 318
  • 3
  • 15
0
votes
1 answer

Scale multi page TIFF Image in java

I want to change the height of multi page TIFF image so I am using below code snippet to scale it. But It returns just first page from the tiff file , I guess it converts it to JPEG image. How to retain all pages of the file?? public static byte[]…
happy
  • 2,550
  • 17
  • 64
  • 109
0
votes
1 answer

How can I save a tif file without loosing the colors from a bytes array?

I need to save a byte array of a tif image using JAI, I got my tif bytes array from gdal. I have the following code: BufferedImage bufferedImage = new BufferedImage( fullWidthSize/2, fullHeightSize/2, BufferedImage.TYPE_BYTE_BINARY); …
zaz
  • 25
  • 1
  • 4