Skip to main content

Out of memory - inserting images and Saving compressed tiffs

14 replies [Last post]
gmb2005
Offline
Joined: 2005-05-31

Hello,
I'm new to JAI, but I managed to write a tiny framework for some basic image operations.
Now, I'm facing the following problem:
I create a barcode (Using barrcode4j), saving it to an image, convering that image to a "Group 4 Fax Encoding" compressed tiff. That works very good. But in step 2 I open an very large bilevel "Group 4 Fax Encoding" compressed tiff an try to add the barcode at a specific position in this image. With small images that works fine, but with the production images (app. 17k px x 20k px) I get an out of memory exception.
Could anybody help?
Thanks in advance

Bjoern

P.S.: Here ist the source (without creating the barcode):

import java.awt.RenderingHints;
import java.awt.color.ICC_ColorSpace;
import java.awt.color.ICC_Profile;
import java.awt.image.BufferedImage;
import java.awt.image.ColorConvertOp;
import java.awt.image.ColorModel;
import java.awt.image.ComponentColorModel;
import java.awt.image.DataBuffer;
import java.awt.image.DataBufferByte;
import java.awt.image.IndexColorModel;
import java.awt.image.renderable.ParameterBlock;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

import javax.media.jai.Histogram;
import javax.media.jai.ImageLayout;
import javax.media.jai.InterpolationNearest;
import javax.media.jai.JAI;
import javax.media.jai.ParameterBlockJAI;
import javax.media.jai.PlanarImage;
import javax.media.jai.ROI;
import javax.media.jai.ROIShape;
import javax.media.jai.TiledImage;

import com.sun.media.jai.codec.ImageCodec;
import com.sun.media.jai.codec.ImageEncoder;
import com.sun.media.jai.codec.TIFFEncodeParam;
import com.sun.media.jai.codec.TIFFField;

public class SolseitImaging {

PlanarImage inputImage;

String CMYKProfilePath;

/**
* @param filename *
* Constructor
*/
public SolseitImaging (String filename) {
this.inputImage = (PlanarImage)JAI.create("fileload", filename);
}

/**
* @param bi
* @return PlanarImage
* convert BufferedImage to PlanarImage
*/
private PlanarImage bufferedImageToPlanarImage (BufferedImage bi) {
ParameterBlock pb = new ParameterBlock();
pb.add(bi);

return (PlanarImage)JAI.create("AWTImage", pb);
}

/**
* @param profilePath
* set the path to icc profile of cmyk
*/
public void setCMYKProfilePath(String profilePath) {
this.CMYKProfilePath = profilePath;
}

/**
* @param degrees
* rotate by degrees clockwise
*/
public void rotateImage(double degrees) {
ParameterBlockJAI pb = new ParameterBlockJAI("rotate");
pb.addSource(this.inputImage);
pb.setParameter("angle", (float)Math.toRadians(degrees));
this.inputImage = JAI.create("rotate", pb);
}

/**
* convert cmyk image to rgb image
*/
public void convertCMYKToRGBImage() {
double[][] MATRIX_CMYK_TO_RGB = {
{ -0.80D, 0.00D, 0.00D, 1.0D, 0.0D }, //R
{ 0.00D, -0.80D, 0.00D, 1.0D, 0.0D }, //G
{ 0.00D, 0.00D, -0.80D, 1.0D, 0.0D } //B
};

ParameterBlock pb = new ParameterBlock();
pb.addSource(this.inputImage);
pb.add(MATRIX_CMYK_TO_RGB);

this.inputImage = (PlanarImage) JAI.create("bandcombine", pb);
}

/**
* @throws IOException
* convert rgb image to cmyk image
*/
public void convertRGBToCMYKImage() throws IOException {
// cmyk Model
int[] bitsCMYK = { 8, 8, 8, 8};
ICC_ColorSpace csCMYK = null;
csCMYK = new ICC_ColorSpace(ICC_Profile.getInstance(this.CMYKProfilePath));
ColorModel colorModelCMYK = new ComponentColorModel(csCMYK, bitsCMYK,false, false, java.awt.Transparency.OPAQUE, DataBuffer.TYPE_BYTE);

//ImageLayout to correctly load the image
ImageLayout cmykLayout = new ImageLayout();
cmykLayout.setColorModel(colorModelCMYK);
RenderingHints rh = new RenderingHints(JAI.KEY_IMAGE_LAYOUT, cmykLayout);

cmykLayout.setSampleModel(colorModelCMYK.createCompatibleSampleModel(this.inputImage.getTileWidth(),this.inputImage.getTileHeight()));
//the colorconversion
ParameterBlock pb = new ParameterBlock();
pb.addSource(this.inputImage);
pb.add(colorModelCMYK);
this.inputImage = JAI.create("ColorConvert", pb, rh);
}

/**
* convert rgb image to grayscale
*
* typical weights for converting RGB to Grayscale
* gray = 0.3*red + 0.59*green + 0.11*blue
*/
public void convertRGBToGrayscaleImage () {
double[][] matrix = {{ 0.3D, 0.59D, 0.11D, 0D }};
ParameterBlock pb = new ParameterBlock();
pb.addSource(this.inputImage);
pb.add(matrix);
this.inputImage = JAI.create("BandCombine", pb, null);
}

/**
* convert grayscale image to bilevel image
*/
public void convertGrayscaleToBlackWhiteImage () {
// Generate a histogram.
Histogram histogram = (Histogram)JAI.create("histogram", this.inputImage).getProperty("histogram");

// Get a threshold equal to the median.
double[] threshold = histogram.getPTileThreshold(0.5);

// if background and foreground could not be separated
if (threshold[0] == 0.0 || threshold[0] == 1.0) {
threshold[0] = 127.5;
}

this.inputImage = JAI.create("binarize", this.inputImage, new Double(threshold[0]));
}

/**
* convert color indexed image to rgb image
*/
public void convertIndexedToRGBImage () {
BufferedImage src = this.inputImage.getAsBufferedImage();

BufferedImage dest = src;
src = new BufferedImage(src.getWidth(), src.getHeight(), BufferedImage.TYPE_INT_RGB); //CHANGE THIS TO TYPE YOU NEED
ColorConvertOp xformOp = new ColorConvertOp(null);
xformOp.filter(dest, src);

this.inputImage = bufferedImageToPlanarImage(dest);
}

/**
* @param width
* @param height
* scale by a factor
*/
public void scaleImage(float width, float height) {
ParameterBlockJAI pb = new ParameterBlockJAI("scale");
pb.addSource(this.inputImage);
pb.setParameter("xScale", width); //x Scale Factor
pb.setParameter("yScale", height); //y Scale Factor
pb.setParameter("xTrans", 0.0F); //x Translate amount
pb.setParameter("yTrans", 0.0F); //y Translate amount
pb.setParameter("interpolation", new InterpolationNearest());
this.inputImage = JAI.create("scale", pb, null);
}

/**
* @param width
* @param height
* scale by pixels / points
*/
public void scaleImage(int width, int height) {
float widthFactor, heightFactor;

widthFactor = (float)(this.inputImage.getWidth() / width);
heightFactor = (float)(this.inputImage.getHeight() / height);

scaleImage (widthFactor,heightFactor);
}

/**
* invert the image
*/
public void invertImage () {
ParameterBlockJAI pb = new ParameterBlockJAI("invert");
pb.addSource(this.inputImage);

this.inputImage = JAI.create("invert", pb);
}

/**
* changes black and white pixels in bilevel images
*/
public void virtualInvertBlackWhiteImage()
{
// Invert the colormodel
byte[] map = new byte[] {(byte)( 255),(byte)(0)};
IndexColorModel colorModel = new IndexColorModel(1, 2, map, map, map);

// Create a bufferedimage with the good colormodel
// and the same data and dimensions as the original image
BufferedImage bi = new BufferedImage(this.inputImage.getWidth(), this.inputImage.getHeight(), BufferedImage.TYPE_BYTE_BINARY, colorModel);
bi.setData(this.inputImage.getAsBufferedImage().getData());

// Invert the image
DataBufferByte dataBufferByte = (DataBufferByte)bi.getRaster().getDataBuffer();
byte[] buffer = dataBufferByte.getData();
for (int dat = 0; dat < buffer.length; dat++) {
buffer[dat] = (byte)(~buffer[dat]);
}

this.inputImage = bufferedImageToPlanarImage(bi);
}

/**
* @param filename
* @param compressionType
* @param xRes
* @param yRes
* @throws FileNotFoundException
* @throws IOException
* save compressed image to file
*/
public void saveCompressedTiffImage (String filename, int compressionType, long xRes, long yRes) throws FileNotFoundException, IOException {
OutputStream out = null;
out = new FileOutputStream(filename);

TIFFEncodeParam param = new TIFFEncodeParam();
// Set dpi to metadata
TIFFField[] extras = new TIFFField[4];
extras[0] = new TIFFField(282,TIFFField.TIFF_RATIONAL, 1, (Object)new long[][] {{xRes,(long)1},{(long)0 ,(long)0}});
extras[1] = new TIFFField(283,TIFFField.TIFF_RATIONAL, 1, (Object)new long[][] {{yRes,(long)1},{(long)0 ,(long)0}});
extras[2] = new TIFFField(262, TIFFField.TIFF_SHORT, 1, (Object) new char[] {0});
extras[3] = new TIFFField(296, TIFFField.TIFF_SHORT, 1, (Object) new char[] {2});

param.setExtraFields(extras);
param.setCompression(compressionType);
ImageEncoder encoder = ImageCodec.createImageEncoder("TIFF", out, param);
encoder.encode(this.inputImage);
out.close();
}

/**
* @param filenameTop
* @param posX
* @param posY
* inserts one image in another
*/
public void insertImage (String filenameTop, int posX, int posY) {
PlanarImage topImage = (PlanarImage)JAI.create("fileload", filenameTop);

// move coordinate system
ParameterBlock pb = new ParameterBlock();
pb.addSource(topImage);
pb.add((float)posX);
pb.add((float)posX);
topImage = JAI.create("translate",pb,null);

// load old image to tiled image
TiledImage ti = new TiledImage(
this.inputImage.getMinX(),
this.inputImage.getMinY(),
this.inputImage.getWidth(),
this.inputImage.getHeight(),
this.inputImage.getTileGridXOffset(),
this.inputImage.getTileGridYOffset(),
this.inputImage.getSampleModel(),
this.inputImage.getColorModel());
ti.set(this.inputImage);

// set rectangle for roi
java.awt.Rectangle r = new java.awt.Rectangle(
topImage.getMinX(),
topImage.getMinY(),
topImage.getWidth(),
topImage.getHeight());

ROI roi = new ROIShape(r);

// import new image data in old image
ti.setData(topImage.getData(), roi);

this.inputImage = ti;
ti = null;
topImage = null;
}

/**
* @param filename
* @param imageType
* save image to file
*/
public void saveImage(String filename, String imageType) {
JAI.create("filestore", this.inputImage, filename, imageType, null);
this.inputImage = null;
}

public static void main (String args[]) {
SolseitImaging myBC = new SolseitImaging("d:\\bctest.tif");

myBC.rotateImage (270);
myBC.convertGrayscaleToBlackWhiteImage ();
myBC.virtualInvertBlackWhiteImage();
try {
myBC.saveCompressedTiffImage("D:\\bctest1.tif", TIFFEncodeParam.COMPRESSION_GROUP4, 1270, 1270);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

SolseitImaging mySI = new SolseitImaging("d:\\TIFF_Test.tif");

mySI.insertImage("D:\\bctest1.tif", 400, 400);

try {
mySI.saveCompressedTiffImage("d:\\TIFF_Test1_mit_barcode.tif", TIFFEncodeParam.COMPRESSION_GROUP4, 1270, 1270);
} catch (FileNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
}

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Brian Burkhalter

No and yes, it's on my list. This is not the only thing I have to do and I
will reply as soon as feasible.

Regards,

Brian

On Tue, 7 Jun 2005 jai-interest@javadesktop.org wrote:

> did you forget me?
> You got my stuff from the last posting?
> Is there any solution? What about using libtiff? Do you think it may help?
>
> Greetz
> Bjoern
> ---
> [Message sent by forum member 'gmb2005' (Bjoern Zapadlo)]
>
> http://www.javadesktop.org/forums/thread.jspa?messageID=88556&#88556
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
> For additional commands, e-mail: interest-help@jai.dev.java.net
>
>

----------------
Brian Burkhalter
Advanced Development, Graphics and Media
Software Chief Technology Office
Sun Microsystems, Inc.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This email message is for the sole use of the intended recipient(s)
and may contain confidential and privileged information. Any
unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
For additional commands, e-mail: interest-help@jai.dev.java.net

gmb2005
Offline
Joined: 2005-05-31

After some more testing, more facts:

- inserting of the barcode in the image crashes with out of memory exception although I reserve 1024MB of memory.

- saving of the big image without inserting runs and runs an only 1K of the destination file is written.

Brian Burkhalter

I don't know why you would get performance as bad as you describe but your
code is definitely not using the most efficient approach in insertImage().

1. TiledImage

A TiledImage will eventual hold in memory all tiles requested from it.
Therefore if all tiles in the image are requested the amount of memory
consumed will equal that required to hold the entire image in memory.

If you want to prevent this data duplication and don't mind that the source
image is overwritten then you can just do

TiledImage ti = new TiledImage(source, true);

which will result in the TiledImage sharing the source image's buffers.

2. RenderedImage.getData(Rectangle)

getData(Rectangle) and getData() will return a Raster which is semantically if
not actually a copy. If the Raster is actually a copy then the amount of
memory will be doubled for the requested region. In JAI if the requested
region lies within a single tile the returned Raster will be a semantic copy
only and will not duplicate data. In all other known cases memory will be
duplicated.

Perhaps a better way to insert the barcode is to use the "Overlay" operation:

http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/ja...

with the second source being the barcode image translated to the desired
location. This operation will be at its most efficient if both the source and
destination images are tiled. If the source image is tiled then the
destination will be tiled by default. The optimum is to start from a tiled
source image on disk.

Brian

On Tue, 31 May 2005 jai-interest@javadesktop.org wrote:

> After some more testing, more facts:
>
> - inserting of the barcode in the image crashes with out of memory exception although I reserve 1024MB of memory.
>
> - saving of the big image without inserting runs and runs an only 1K of the destination file is written.
> ---
> [Message sent by forum member 'gmb2005' (Bjoern Zapadlo)]
>
> http://www.javadesktop.org/forums/thread.jspa?messageID=85934&#85934
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
> For additional commands, e-mail: interest-help@jai.dev.java.net

----------------
Brian Burkhalter
Advanced Development, Graphics and Media
Software Chief Technology Office
Sun Microsystems, Inc.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This email message is for the sole use of the intended recipient(s)
and may contain confidential and privileged information. Any
unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
For additional commands, e-mail: interest-help@jai.dev.java.net

gmb2005
Offline
Joined: 2005-05-31

Big thanks to burian!
Now inserting of the image works fine with great performance. Here's the source of the insertImage method:

public void insertImage (String filenameTop, int posX, int posY) {
PlanarImage topImage = (PlanarImage)JAI.create("fileload", filenameTop);

// move coordinate system
ParameterBlock pbTranslate = new ParameterBlock();
pbTranslate.addSource(topImage);
pbTranslate.add((float)posX);
pbTranslate.add((float)posX);
topImage = JAI.create("translate",pbTranslate,null);

ParameterBlock pbOverlay = new ParameterBlock();
pbOverlay.addSource(this.inputImage);
pbOverlay.addSource(topImage);

// Inserting Barcode
this.inputImage = JAI.create("overlay", pbOverlay);
}

BUT
Now I have problems saving these images to disk.
Neither the saveCompressedImage nor the saveImage method writes the images to disk, both hang and produce a 0 KB Image. But no exception is thrown. This Problem only occur with big images.
Anybody knows why?

Brian Burkhalter

On Wed, 1 Jun 2005 jai-interest@javadesktop.org wrote:

> Big thanks to burian!
> Now inserting of the image works fine with great performance. Here's the source of the insertImage method:

Great!

> BUT
> Now I have problems saving these images to disk.
> Neither the saveCompressedImage nor the saveImage method writes the images to disk, both hang and produce a 0 KB Image. But no exception is thrown. This Problem only occur with big images.
> Anybody knows why?

What is the image layout (dimensions, tile dimensions, samples per pixel, bits
per sample)? What are the output details (I think you said TIFF bilevel with
group 4 compression)?

Brian

----------------
Brian Burkhalter
Advanced Development, Graphics and Media
Software Chief Technology Office
Sun Microsystems, Inc.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This email message is for the sole use of the intended recipient(s)
and may contain confidential and privileged information. Any
unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
For additional commands, e-mail: interest-help@jai.dev.java.net

gmb2005
Offline
Joined: 2005-05-31

Hi Brian,

the images I'd like to process are print-images, thus they are really big, approx. 15k px * 30k px.
They are rastered bilevel images (the original cmyk-image is separated into 4 bilevel images,one for each color) with group 4 compression.
The problems occur only on images bigger than about 3,5 MB. Images more little work ok.
I hope, I answered all your questions and that you can help me! ;-)

Greetz
Bjoern

Brian Burkhalter

Would you be able to supply a data set with a self-contained test case? I know
you already have posted code so perhaps just the data would suffice.

Thanks,

Brian

On Thu, 2 Jun 2005 jai-interest@javadesktop.org wrote:

> Hi Brian,
>
> the images I'd like to process are print-images, thus they are really big, approx. 15k px * 30k px.
> They are rastered bilevel images (the original cmyk-image is separated into 4 bilevel images,one for each color) with group 4 compression.
> The problems occur only on images bigger than about 3,5 MB. Images more little work ok.
> I hope, I answered all your questions and that you can help me! ;-)
>
> Greetz
> Bjoern

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
For additional commands, e-mail: interest-help@jai.dev.java.net

gmb2005
Offline
Joined: 2005-05-31

Here you get anything you need. (source, libs, testImages).
http://www.zapadlo.de/javaImaging.zip

Thanks in advance!!!

Greetz
Bjoern

gmb2005
Offline
Joined: 2005-05-31

Hi Brian,

did you forget me?
You got my stuff from the last posting?
Is there any solution? What about using libtiff? Do you think it may help?

Greetz
Bjoern

gmb2005
Offline
Joined: 2005-05-31

NEWS!!!

Ok, the problem seems to be the following.
If I use an compressed image as inputImage the method hangs. If I take the compressed, convert it to an uncompressed tif via photoshop, etc. and try it, it works.
Perhaps there is an problem reading the compressed image.
Does anybody know if I have to use a special reading method for compressed tiffs instead of "fileload"?

Thanks in advance!
Bjoern

Brian Burkhalter

No, the reader/decoder should automatically detect the type of compression
from the Compression field and use the appropriate decompression algorithm.

Brian

On Tue, 7 Jun 2005 jai-interest@javadesktop.org wrote:

> NEWS!!!
>
> Ok, the problem seems to be the following.
> If I use an compressed image as inputImage the method hangs. If I take the compressed, convert it to an uncompressed tif via photoshop, etc. and try it, it works.
> Perhaps there is an problem reading the compressed image.
> Does anybody know if I have to use a special reading method for compressed tiffs instead of "fileload"?
>
> Thanks in advance!
> Bjoern
> ---
> [Message sent by forum member 'gmb2005' (Bjoern Zapadlo)]

----------------
Brian Burkhalter
Advanced Development, Graphics and Media
Software Chief Technology Office
Sun Microsystems, Inc.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This email message is for the sole use of the intended recipient(s)
and may contain confidential and privileged information. Any
unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
For additional commands, e-mail: interest-help@jai.dev.java.net

gmb2005
Offline
Joined: 2005-05-31

Hi Brian,

I analyse the images via libtiff => tiffinfo.
Perhaps this may help...

1.) Original (works not):
-------------------------
d:\tiff_test.tif: Warning, unknown field with tag 37680 (0x9330) ignored.
TIFF Directory at offset 0x408d84
Subfile Type: (0 = 0x0)
Image Width: 17463 Image Length: 27008
Resolution: 1270, 1270 pixels/inch
Bits/Sample: 1
Compression Scheme: CCITT Group 4
Photometric Interpretation: min-is-white
Software: "DeltaOutput"
Samples/Pixel: 1
Rows/Strip: 27008
Planar Configuration: single image plane
SubIFD Offsets: 4244644

2.) Converted via IrfanView (works):
------------------------------------
TIFF Directory at offset 0x383a288
Image Width: 17463 Image Length: 27008
Resolution: 1270, 1270 pixels/inch
Bits/Sample: 1
Compression Scheme: None
Photometric Interpretation: min-is-white
Software: "IrfanView"
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 1
Rows/Strip: 3
Planar Configuration: single image plane

3.) Other TestImage (works):
----------------------------
TIFF Directory at offset 0x63b1a
Image Width: 14880 Image Length: 10495
Resolution: 1270, 1270 pixels/inch
Bits/Sample: 1
Compression Scheme: CCITT Group 4
Photometric Interpretation: min-is-white
Software: "DeltaOutput"
Document Name: "Dokument 5_1_FrontBlack.tif"
Image Description: "Black;;1;;305447026"
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 1
Rows/Strip: 512
Planar Configuration: single image plane

4.) Converted via libtiff (works not):
--------------------------------------
TIFF Directory at offset 0x383a288
Subfile Type: (0 = 0x0)
Image Width: 17463 Image Length: 27008
Resolution: 1270, 1270 pixels/inch
Bits/Sample: 1
Compression Scheme: None
Photometric Interpretation: min-is-white
Software: "DeltaOutput"
Samples/Pixel: 1
Rows/Strip: 27008
Planar Configuration: single image plane

=> Differences between working and not working tiffs

working | not working
------- | -----------
none | Subfile Type: (0 = 0x0)
Orientation: row 0 top, col 0 lhs | none
Rows/Strip: 512 | Rows/Strip: 27008

gmb2005
Offline
Joined: 2005-05-31

Hi,

I got some more test images and curiously, 100% of these work fine.
I think, that it is perhaps a little bug in jai with these "special" images. I don't know, perhaps thy are a little but out of standard.
But I still need a solution for this problem or a detection for the bad images, because a hang without exception is the worst case.

Greetz
Bjoern

gmb2005
Offline
Joined: 2005-05-31

Hi, now I managed to get it started (I just entered the vmargs in eclipse project)...
BUT
i does not work. no error, no eception it just runs and runs, 1KB of the outputfile is written, not mor. And my CPU is up to 60% for about 5 minutes now.
Any ideas? Perhaps there are bugs in my code?!