I have a method that will print TIFF images to my pdf and my business
requirements have changed and now i need to support JPG images also. 

currently the logic boils down to this:



PdfContentByte cb = writer.getDirectContent(); 

k=1;

ParameterBlock pb = new ParameterBlock();
pb.add(s);
pb.add(new TIFFDecodeParam());
pb.add(k);
RenderedImage ri = JAI.create("TIFF", pb);

Raster ra = ri.getData();
                                
BufferedImage bi =new BufferedImage(
                        ri.getColorModel(),
                        Raster.createWritableRaster(
                        ri.getSampleModel(),
                        ra.getDataBuffer(),
                        null),
                        false,
                        new Hashtable());
Image img = Image.getInstance(bi, null, true);
                                
cb.addImage(img);


MY QUESTION IS THIS.  CAN I create a rendered image with a JPEGDecodeParam()
instead of the TIFFDecodeParam and if so what do i use as params  for the
JAI.create method.  I can't find a reference for valid operator names for
the JAI.create method



        


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to