Am 08.09.2021 um 22:17 schrieb John Lussmyer:
You can see the diference in the results in the images I used in a
StackOverflow posting. (Before I remembers this email list.)
https://stackoverflow.com/questions/69107975/how-to-improve-text-contrast-in-pdfbox-rendered-thumbnail-image
Ooops, you didn't mention that you turned antialiasing off. The image
looks as if interpolation was also turned off. If you set rendering
hints you always have to set all the hints you need. Here's the default:
private RenderingHints createDefaultRenderingHints(Graphics2D graphics)
{
RenderingHints r = new RenderingHints(null);
r.put(RenderingHints.KEY_INTERPOLATION, isBitonal(graphics) ?
RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR :
RenderingHints.VALUE_INTERPOLATION_BICUBIC);
r.put(RenderingHints.KEY_RENDERING,
RenderingHints.VALUE_RENDER_QUALITY);
r.put(RenderingHints.KEY_ANTIALIASING, isBitonal(graphics) ?
RenderingHints.VALUE_ANTIALIAS_OFF :
RenderingHints.VALUE_ANTIALIAS_ON);
return r;
}
Tilman
On Wed Sep 08 12:40:14 PDT 2021 [email protected] said:
On Wed Sep 08 12:20:59 PDT 2021 [email protected] said:
Am 08.09.2021 um 21:16 schrieb John Lussmyer:
Ok, just tried that - no change.
We are currently trying PDFBox 3.0.0-RC1 - is that a problem?
No, this is excellent; there will be a new release of another beta in a
few days. You can try it here
https://dist.apache.org/repos/dist/dev/pdfbox/3.0.0-alpha2/
Is the PDFBox code creating the same image size as the old code? What
code are you using? Can you share a file and the result (upload to
sharehoster)?
Image size is within a couple pixels in. Same format (ARGB). The the older
renderer image file is about twice as many bytes of image file.
Can't really share the original as it has some names and account numbers.
The main feature of the PDF is that it is pure text, no images. 8.5 x 11.
--
Try my Sensible Email package! https://sourceforge.net/projects/sensibleemail/
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--
Worlds only All Electric F-250 truck!
http://john.casadelgato.com/Electric-Vehicles/1995-Ford-F-250
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]