Jason Berk wrote: > If I have an instance of com.itextpdf.text.Image, how do I get the > actual bytes of the image? > > I need to take an Image instance, and resize it dynamically (which I > assume I need to do via java graphics, not iText). Then I need to take > that resized image and convert it back to a com.itextpdf.text.Image so I > add it to a button. > > Make sense?
No, that doesn't make sense. Some images (such as WMF files) are translated into PDF syntax. The bit and bytes of other images (such as JPEGs) are kept as-is. And images such as GIFs and PNGs are decoded and changed into some kind of bitmap that is zipped (see chapter 10 of the second edition of iText in Action). You can't just "take an Image instance" and resize it. You need to take the bits and bytes you've been feeding to the construct the Image instance and resize the original image. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
