hi thomas, i tried putting the COLOR_ID as COLOR_ID_YCbCrA ,but still it throws the same error.may be something i am doing wrong.. reg writing a rendered image to remove alpha any links provided will be of great help. many thanks
On Fri, 24 Oct 2003 Thomas DeWeese wrote : >techno info wrote: > >>hi thomas, >>many thanks,i did modify the code that takes the band. >>i am getting the floowing error >>/* >>Exception breakpoint occurred at line 158 of JPEGParam.java. >>java.lang.IllegalArgumentException: NumComponents not in sync with COLOR_ID > >Ooops, sorry, the SVG Image has alpha so you will either need to write >a small renderedImage to remove the Alpha (way beyond the scope of this >list) or use COLOR_ID_YCbCrA (The 'A' is for Alpha). > >> >>*/ i also noticed that Abstractred.getSampleModel i.e im.getSampleModel() is >>fetching no value. >>i might be doing something wrong. >> >>On Fri, 24 Oct 2003 Thomas DeWeese wrote : >> >>>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.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 >>>>>> >>>>>> >>>>>>*/ >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> >>>>>--------------------------------------------------------------------- >>>>>To unsubscribe, e-mail: [EMAIL PROTECTED] >>>>>For additional commands, e-mail: [EMAIL PROTECTED] >>>>> >>>> >>>> >>>> >>> >>> >>> >>>--------------------------------------------------------------------- >>>To unsubscribe, e-mail: [EMAIL PROTECTED] >>>For additional commands, e-mail: [EMAIL PROTECTED] >>> >> >> >> > > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >