pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Buzzy Spain <bsp...@heartflow.com>
Subject Images in pdf not the same RGB
Date Tue, 10 Sep 2013 20:45:18 GMT
Hi all,

I am trying to understand why the images I am writing into a pdf end up
with different rgb values than the input images.

As an example, for one image, if I open the png  file in MS Paint and use
the color picker I get RGB of (179,26,51).  After writing that same image
to a page's content stream, saving the document, and then opening it in
Adobe Acrobat, if I use a color picker tool the RGB value is (181, 52, 58).
 Other images have significant shifts in other channels.

Can anyone provide any tips on how to address this?


ps. Code for adding images to document is below:

BufferedImage image = ImageIO.read(new File("colorLegend.png"));
PDJpeg xImage = new PDJpeg(document, image, quality);
//PDPixelMap xImage = new PDPixelMap(document, image);  // <--- doesn't
seem to help
contentStream.drawXObject(xImage, x, y, width, height);

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message