You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by José Rodolfo Carrijo de Freitas <jo...@softplan.com.br> on 2010/08/17 20:29:30 UTC
PDJPeg inflating image.
Hello all,
Im trying to squeeze my pdf images to get a smaller pdf.
When I m going to insert the compacted image in the pdf, the PDJPeg class
makes my images big.
I don´t know if I have to set some king of specific metadata to keep my
image size, and I hope some of you could give me a tip
What can I do to not have my image inflated ?
Thank you.
RES: PDJPeg inflating image.
Posted by José Rodolfo Carrijo de Freitas <jo...@softplan.com.br>.
I´ve resolved the issue making a class in my project that inherits PDJpeg
and implements a constructor
Which receives a float for compressionQuality, used when writing
To the outputStream used inside the class.
After making that way I thought that the best way is to have the third
argument as a ImageWriteParam.
So we could pass others parameters to write the raster on the stream.
cheers
-----Mensagem original-----
De: José Rodolfo Carrijo de Freitas [mailto:jose.freitas@softplan.com.br]
Enviada em: terça-feira, 17 de agosto de 2010 16:41
Para: dev@pdfbox.apache.org
Assunto: RES: PDJPeg inflating image.
I found that is not a issue of pdfbox.
On line 140 of PDJpeg class
There is a line :
ImageIO.write(bi,"jpeg",os);
On this line it gets a bigger "os" cause the buffered image, bi, has the
raster and not the compacted image, so its writing a new image, and writes a
bigger one.
I wonder if I could have a better luck.
=)
Thank you.
-----Mensagem original-----
De: José Rodolfo Carrijo de Freitas [mailto:jose.freitas@softplan.com.br]
Enviada em: terça-feira, 17 de agosto de 2010 15:30
Para: dev@pdfbox.apache.org
Assunto: PDJPeg inflating image.
Hello all,
Im trying to squeeze my pdf images to get a smaller pdf.
When I m going to insert the compacted image in the pdf, the PDJPeg class
makes my images big.
I don´t know if I have to set some king of specific metadata to keep my
image size, and I hope some of you could give me a tip
What can I do to not have my image inflated ?
Thank you.
RES: PDJPeg inflating image.
Posted by José Rodolfo Carrijo de Freitas <jo...@softplan.com.br>.
I found that is not a issue of pdfbox.
On line 140 of PDJpeg class
There is a line :
ImageIO.write(bi,"jpeg",os);
On this line it gets a bigger "os" cause the buffered image, bi, has the
raster and not the compacted image, so its writing a new image, and writes a
bigger one.
I wonder if I could have a better luck.
=)
Thank you.
-----Mensagem original-----
De: José Rodolfo Carrijo de Freitas [mailto:jose.freitas@softplan.com.br]
Enviada em: terça-feira, 17 de agosto de 2010 15:30
Para: dev@pdfbox.apache.org
Assunto: PDJPeg inflating image.
Hello all,
Im trying to squeeze my pdf images to get a smaller pdf.
When I m going to insert the compacted image in the pdf, the PDJPeg class
makes my images big.
I don´t know if I have to set some king of specific metadata to keep my
image size, and I hope some of you could give me a tip
What can I do to not have my image inflated ?
Thank you.