iText can only place the image as-is. It will still have 1000x1000 and it
won't be sub-sampled to be smaller or to fit your desidered dpi. In other
words, the decode/encode to jpeg must be done somewhere else.
----- Original Message -----
From: "David Woosley" <[EMAIL PROTECTED]>
To: "iText Questions (E-mail)" <[email protected]>
Sent: Saturday, January 21, 2006 12:04 AM
Subject: [iText-questions] Most efficient way to draw image
I'm trying to learn the best method to draw a JPG image using the stamper.
I
need a method like this:
public void drawMyImage (PdfStamper stamper, String imageFileName,
PdfRectangle rect, float quality, int dpi) {
// ???
}
The imageFileName represents a high-resolution JPG on disk. It is usually
a
very large image (1000x1000 or more). It will be drawn into a relatively
small space on the PDF, like 1x1 inch.
I want to draw the image on the over content using the position and size
of
the rectangle at the specified quality (0 to 1). I'm not sure if the DPI
argument is needed. The image in the PDF should be decoded with the
DCTDecode filter. I've tried several variations, and all I get is a white
rectangle (without the image).
Help? Thanks.
David
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions