-------------- Original message ---------------------- From: Dominic Maricic <[EMAIL PROTECTED]> <snip> > Yes I have the book, and I've read it at least once all the way through and > refer to it often. The reason for the pre-processing is that the image gets > loaded into the program once and then saved and used every time they use the > program.
I understand now, and can see you have some good reasons for pre-processing to get the image into a format and size you want for repetitive use. > If I only scale an image thats say, 2 megs and 2000 pixels wide that > the user selects, but the widest the program can use is 500 pixels, I take it that the image-editing program is the program in this context, as iText has no such limit on the width of an image it can process. > then by > reducing the image is better than scaling as the image size will be smaller. > So > a 30k png will be inserted into the pdf rather than a 200k 'scaled' pdf. Yes. Downsampling an image to a lower resolution and cropping, as well as scaling to a smaller size in an image editing program can reduce the file size. > Unless > I'm missing something here, scaling and image still uses the original image, > just like in an html document. > Yes, this is true with iText. > If I'm wrong about this, please let me know and I'll just save whatever > original > they give me and scale it. I'd be inclined to put a limit on the file size of images that are allowed to be uploaded, placing the responsibility for pre-processing the images to reasonable file sizes on the providers of the images. IMO, you may not want to give customers/users unlimited ability to make the performance of your software sluggish. You may wish to look into how www.rcgroups.com downsamples users images for display on their web site. I doubt seriously they're doing the downsampling manually. You should be able to find command-line based image transformation software (free) that can do this pre-processing for you "automagically". I can't remember right now the name of the one I've used, but if you search the archives of Linux Magazine, you should be able to find it. Best regards, Bill Segraves ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar
