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??

regds
GVS
-----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 =
com.sun.image.codec.jpeg.JPEGCodec.getDefaultJPEGEncodeParam
                       (im.getSampleModel().getNumBands(), jpegColorID);



techno info wrote:

> hi thomas,
> correct if i am wrong,is this way i create???.
> /*
> jpegColorID =
>
com.sun.image.codec.jpeg.JPEGDecodeParam.COLOR_ID_YCbCr;
> 
> Raster tile00 = im.getTile(0, 0);
> 
> jpegEncodeParam =
com.sun.image.codec.jpeg.JPEGCodec.getDefaultJPEGEncodeParam(
>                     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.TIFFImageEncoder.encode(java.awt.i
mage.RenderedImage,
org.apache.batik.ext.awt.image.codec.tiff.TIFFEncodeParam, int, boolean)
TIFFImageEncoder.java:441 void
org.apache.batik.ext.awt.image.codec.tiff.TIFFImageEncoder.encode(java.awt.i
mage.RenderedImage) TIFFImageEncoder.java:164 void
org.apache.batik.apps.tiledTranscoder.TiledImageTranscoder.transcode(org.w3c
.dom.Document, java.lang.String,
org.apache.batik.transcoder.TranscoderOutput) TiledImageTranscoder.java:76
void
org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(org.apache.batik
.transcoder.TranscoderInput, org.apache.batik.transcoder.TranscoderOutput)
XMLAbstractTranscoder.java:174 void
org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(org.apache.batik
.transcoder.TranscoderInput, org.apache.batik.transcoder.TranscoderOutput)
SVGAbstractTranscoder.java:188
>>>
>>>
>>>*/
>>>
>>>
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>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
http://www.mci.com

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


Mime
View raw message