Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - BW Dithered image renders to Gray Scale
  FAQ FAQ  Forum Search   Register Register  Login Login

BW Dithered image renders to Gray Scale

 Post Reply Post Reply
Author
Message
John Sigoloff View Drop Down
Beginner
Beginner


Joined: 20 Sep 06
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote John Sigoloff Quote  Post ReplyReply Direct Link To This Post Topic: BW Dithered image renders to Gray Scale
    Posted: 30 Dec 07 at 3:44PM
I have a black and white PDF that is rendered by QP to a gray scale image.  I have checked it with GhostScript and Adobe and it is a black and white.  The image was color and was converted to BW dithered (ie different BW patterns for different shades of gray).  Any help would be appreciated
Back to Top
marian_pascalau View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 28 Mar 06
Location: Germany
Status: Offline
Points: 278
Post Options Post Options   Thanks (0) Thanks(0)   Quote marian_pascalau Quote  Post ReplyReply Direct Link To This Post Posted: 03 Jan 08 at 7:50AM
Send sample to support(at)quickpdf(dot)org
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 03 Jan 08 at 8:15AM
Hi John!

Perhaps it's better to upload a sample online and post the link (with an error description) here - so anybody who's reading here can help and not only one ;-)

Best regards and a happy new year,
Ingo

Back to Top
John Sigoloff View Drop Down
Beginner
Beginner


Joined: 20 Sep 06
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote John Sigoloff Quote  Post ReplyReply Direct Link To This Post Posted: 03 Jan 08 at 11:17PM
See next post

Edited by John Sigoloff - 03 Jan 08 at 11:19PM
Back to Top
John Sigoloff View Drop Down
Beginner
Beginner


Joined: 20 Sep 06
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote John Sigoloff Quote  Post ReplyReply Direct Link To This Post Posted: 03 Jan 08 at 11:18PM
See image: http://home.netcom.com/~jsiggy/BW_Renders_Gray.pdf for an example of a BW Dithered image that renders gray & dithered...
 
Regards,
 
John
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 04 Jan 08 at 2:48AM
Hi John!

Inside you can find this:
/ColorSpace /DeviceGray /BitsPerComponent 1
If tested with QP 5.21 ... It's gray scaled,
with Sumatra 0.6, Foxit Reader 2.2 and Adobe Reader 8.1 ... It looks always bw dithered.
Perhaps the reason is only the size of your qp-rendered image and it only seems to be gray scaled? If i reduce the zoom of the above readers the document seems to be gray scaled, too...?

Best regards,
Ingo


Back to Top
lcarrere View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 10 Jul 06
Location: France
Status: Offline
Points: 47
Post Options Post Options   Thanks (0) Thanks(0)   Quote lcarrere Quote  Post ReplyReply Direct Link To This Post Posted: 04 Jan 08 at 4:09AM
Hi all and happy new year.

Ingo,

As you know, IsedQuickPDF uses the GDI+ functions to draw images & shapes during the rendering process.

I haven't the source code of the library but I think the "problem" come from here:

When the bw image is drawn into a gdi+ graphics, the interpolation mode used are not InterpolationModeNearestNeighbor. In this case, with 1bpp rendering process the resulting drawn image appears as grayscale.

With GDI+ when we draw image into graphic kepping original size the best way is to set the Interpolation mode to InterpolationModeNearestNeighbor and the smoothing mode to SmoothingModeNone (see gdi+ reference guide).


Best regards,

Loïc Carrère


Edited by lcarrere - 04 Jan 08 at 4:17AM
Back to Top
John Sigoloff View Drop Down
Beginner
Beginner


Joined: 20 Sep 06
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote John Sigoloff Quote  Post ReplyReply Direct Link To This Post Posted: 04 Jan 08 at 4:17PM
Loic et al,
 
setting the Interpolation mode to InterpolationModeNearestNeighbor (source required) and the smoothing mode to SmoothingModeNone solved the problem.  Thanks alot...
 
Cheers,
 
John

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store