xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "techno info" <techo_i...@rediffmail.com>
Subject Re: Re: out of memory
Date Fri, 24 Oct 2003 12:56:56 GMT
<P>
hi thomas,<BR>
i tried putting the COLOR_ID as COLOR_ID_YCbCrA ,but still it throws the same error.may be
something i am doing wrong..<BR>
reg writing a rendered image to remove alpha any links provided will be of great help.<BR>
many thanks<BR>
<BR>
<BR>
On Fri, 24 Oct 2003 Thomas DeWeese wrote :<BR>
&gt;techno info wrote:<BR>
&gt;<BR>
&gt;&gt;hi thomas,<BR>
&gt;&gt;many thanks,i did modify the code that takes the band.<BR>
&gt;&gt;i am getting the floowing error<BR>
&gt;&gt;/*<BR>
&gt;&gt;Exception breakpoint occurred at line 158 of JPEGParam.java.<BR>
&gt;&gt;java.lang.IllegalArgumentException: NumComponents not in sync with COLOR_ID<BR>
&gt;<BR>
&gt;Ooops, sorry, the SVG Image has alpha so you will either need to write<BR>
&gt;a small renderedImage to remove the Alpha (way beyond the scope of this<BR>
&gt;list) or use COLOR_ID_YCbCrA (The 'A' is for Alpha).<BR>
&gt;<BR>
&gt;&gt;<BR>
&gt;&gt;*/ i also noticed that Abstractred.getSampleModel i.e im.getSampleModel()
is fetching no value.<BR>
&gt;&gt;i might be doing something wrong.<BR>
&gt;&gt;<BR>
&gt;&gt;On Fri, 24 Oct 2003 Thomas DeWeese wrote :<BR>
&gt;&gt;<BR>
&gt;&gt;&gt;Hi Techno,<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&nbsp;  This is pretty close, but I would use the getDefaultJPEGEncodeParam<BR>
&gt;&gt;&gt;that takes a number of bands:<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt;jpegColorID = com.sun.image.codec.jpeg.JPEGDecodeParam.COLOR_ID_YCbCr;<BR>
&gt;&gt;&gt;jpegEncodeParam = com.sun.image.codec.jpeg.JPEGCodec.getDefaultJPEGEncodeParam<BR>
&gt;&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (im.getSampleModel().getNumBands(),
jpegColorID);<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt;techno info wrote:<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;hi thomas,<BR>
&gt;&gt;&gt;&gt;correct if i am wrong,is this way i create???.<BR>
&gt;&gt;&gt;&gt;/*<BR>
&gt;&gt;&gt;&gt;jpegColorID =<BR>
&gt;&gt;&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; com.sun.image.codec.jpeg.JPEGDecodeParam.COLOR_ID_YCbCr;<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;Raster tile00 = im.getTile(0, 0);<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;jpegEncodeParam =&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; com.sun.image.codec.jpeg.JPEGCodec.getDefaultJPEGEncodeParam(<BR>
&gt;&gt;&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; tile00, jpegColorID);<BR>
&gt;&gt;&gt;&gt;*/<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;On Thu, 23 Oct 2003 Thomas DeWeese wrote :<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt;techno info wrote:<BR>
&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt;&gt;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<BR>
&gt;&gt;&gt;&gt;&gt;&gt;to GVS.infact i am getting a null pointer
exception. In the encode<BR>
&gt;&gt;&gt;&gt;&gt;&gt;method of TIFFImageEncoder,it is calling encodeParam.getJPEGEncodeParam()
to get the JPEGEncodeParam.the value of JPEGEncodeParam is coming as null.<BR>
&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt;So did you try providing a JPEGEncodeParam?<BR>
&gt;&gt;&gt;&gt;&gt;As I said I've never actually used these TIFF formats.<BR>
&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt;&gt;/*<BR>
&gt;&gt;&gt;&gt;&gt;&gt;Exception breakpoint occurred at line 441
of TIFFImageEncoder.java.<BR>
&gt;&gt;&gt;&gt;&gt;&gt;java.lang.NullPointerException: java.lang.NullPointerException
int org.apache.batik.ext.awt.image.codec.tiff.TIFFImageEncoder.encode(java.awt.image.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.image.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<BR>
&gt;&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt;&gt;*/<BR>
&gt;&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt;---------------------------------------------------------------------<BR>
&gt;&gt;&gt;&gt;&gt;To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org<BR>
&gt;&gt;&gt;&gt;&gt;For additional commands, e-mail: batik-users-help@xml.apache.org<BR>
&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt;---------------------------------------------------------------------<BR>
&gt;&gt;&gt;To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org<BR>
&gt;&gt;&gt;For additional commands, e-mail: batik-users-help@xml.apache.org<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;<BR>
&gt;&gt;<BR>
&gt;&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt;---------------------------------------------------------------------<BR>
&gt;To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org<BR>
&gt;For additional commands, e-mail: batik-users-help@xml.apache.org<BR>
&gt;<BR>

</P>
<br><br>
<A target="_blank" HREF="http://clients.rediff.com/signature/track_sig.asp"><IMG
SRC="http://ads.rediff.com/RealMedia/ads/adstream_nx.cgi/www.rediffmail.com/inbox.htm@Bottom"
BORDER=0 VSPACE=0 HSPACE=0 HEIGHT=74 WIDTH=496></a>

Mime
View raw message