xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GVS Srinivas <GVS.Srini...@cramer.co.uk>
Subject RE: out of memory
Date Mon, 27 Oct 2003 09:04:53 GMT
hi thomas,
i managed to get the jpeg transcoder working by just setting the KEY_AOI to
the exact size of the bounding box of my view on the canvass.earlier ,since
i didnt mention the AOI ,i presume that batik is trying to convert the whole
canvas into jpeg image which is blowing up memory.i am not very sure.but now
that problem is resolved,but i need to the BBox size from the document.
now i have a small requirement 
i am passing the transcode input as a String Reader.
i want to set the AOI by getting the BBox of the SVG document.is there
anyway i can get the reference to svgdocument,before i call the transcode
function of  jpegtranscoder.
to get the boundingbox size i dont want to reparse the document again,as i
know that batik already does that.
is there any way i can access the dom structure from batik??

-----Original Message-----
From: Thomas DeWeese [mailto:Thomas.DeWeese@Kodak.com]
Sent: Thursday, October 23, 2003 8:56 PM
To: Batik Users
Subject: Re: out of memory

Hi Techno,

    This is pretty close, but I would use the getDefaultJPEGEncodeParam
that takes a number of bands:

jpegColorID = com.sun.image.codec.jpeg.JPEGDecodeParam.COLOR_ID_YCbCr;
jpegEncodeParam =
                       (im.getSampleModel().getNumBands(), jpegColorID);

techno info wrote:

> hi thomas,
> correct if i am wrong,is this way i create???.
> /*
> jpegColorID =
> Raster tile00 = im.getTile(0, 0);
> jpegEncodeParam =
>                     tile00, jpegColorID);
> */
> On Thu, 23 Oct 2003 Thomas DeWeese wrote :
>>techno info wrote:
>>>i am facing with similar problem of memory outburst when i try to convert
svg to jpg. i tried the solution mentioned by you earlier
>>>to GVS.infact i am getting a null pointer exception. In the encode
>>>method of TIFFImageEncoder,it is calling encodeParam.getJPEGEncodeParam()
to get the JPEGEncodeParam.the value of JPEGEncodeParam is coming as null.
>>  So did you try providing a JPEGEncodeParam?
>>As I said I've never actually used these TIFF formats.
>>>Exception breakpoint occurred at line 441 of TIFFImageEncoder.java.
>>>java.lang.NullPointerException: java.lang.NullPointerException int
org.apache.batik.ext.awt.image.codec.tiff.TIFFEncodeParam, int, boolean)
TIFFImageEncoder.java:441 void
mage.RenderedImage) TIFFImageEncoder.java:164 void
.dom.Document, java.lang.String,
org.apache.batik.transcoder.TranscoderOutput) TiledImageTranscoder.java:76
.transcoder.TranscoderInput, org.apache.batik.transcoder.TranscoderOutput)
XMLAbstractTranscoder.java:174 void
.transcoder.TranscoderInput, org.apache.batik.transcoder.TranscoderOutput)
>>To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
>>For additional commands, e-mail: batik-users-help@xml.apache.org

To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org

This e-mail has been scanned for viruses by MCI's Internet Managed Scanning
Services - powered by MessageLabs. For further information visit

To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org

View raw message