Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, June 11, 2015 3:06:59 AM(UTC)

cj2883  
cj2883

Groups: Registered
Posts: 2


I'm having a similar problem, however my images are B&W, but listed as 24-bit color, which is unfortunate because I cannot diferentiate between them and my color images, so setting the codecs.Options.Pdf.Load.DisplayDepth property to 1 will not work.

I also have to display bitonal and color tiff images, for which RasterPaintDisplayModeFlags.ScaleToGray seems to be optimal.

Do you have any other recommendations?
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Sunday, June 14, 2015 10:02:12 PM(UTC)

mohamed  
mohamed

Groups: Registered, Tech Support
Posts: 179


Our moderator has split your post to a new thread.
Please provide full information about the case you're facing, because it may or may not be similar or related to the old issue where originally posted.

1. Which LEADTOOLS version are you using? The recent versions of the toolkit have the ability to detect PDF page colors and determine the bits per pixel value to rasterize them. Older versions always defaulted to 24-bits.

2. You can use this approach with different versions if it suits your needs:
  • Count the unique colors in the file using the ColorCountCommand Class function. If the number of colors is more than two, the image will not be black and white. This could happen if it contains non-black text or other color images or graphics objects:
  • ColorCountCommand MyCommand = new ColorCountCommand();
  • MyCommand.Run(RasterImage);
  • If the color count is 2, the image can be loaded as 1-bit. If it's between 3 and 256, it can be palettized (8-bits or less). If above 256, treat it as 24-bits.

3. If this doesn't solve your case, reply with more details and include a sample PDF file. If you attach files, put them in a ZIP or RAR file and do not use the Preview feature.
Mohamed Abedallah
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.058 seconds.