Page 1 of 1

ConvertTo1BppFast vs. ConvertTo1Bpp

Posted: Tue Jan 26, 2010 12:47 am
by mjnaleva
Can someone provide more details on how these two methods are different?

I had been using GdPictureImaging.ConvertTo1BppFast() for performance reasons before having an image go through the OCR plugin but have discovered that in some cases the resulting image is not acceptable (ie: completely black) whereas the ConvertTo1Bpp function seems to create a good image. This case actually has only come up with a single PDF file thus far. In sample code I've seen around it appears that the ConvertTo1Bpp() is generally used prior to OCR processing, so I am planning to switch to it.

However, is there considerable performance differences between the methods or any other reliability risks when using one method versus another? I am processing small images (typically less than 2" x 2") but I want reliability to be as good as hoped without suffering any serious performance issues.

Thanks,
Mark

Re: ConvertTo1BppFast vs. ConvertTo1Bpp

Posted: Tue Jan 26, 2010 4:31 pm
by Loïc
Hi Mark,

In your case the ConvertTo1Bpp() method must be used and should not create performance issue.

The ConvertTo1BppFast() should be used only if you are sure that your original file contains only black or white pixels.

With best regards,

Loïc Carrère

Re: ConvertTo1BppFast vs. ConvertTo1Bpp

Posted: Mon Feb 01, 2010 7:59 pm
by mjnaleva
Hi Loic,

An interesting observation I'm seeing with ConvertTo1BppFast versus ConvertTo1Bpp is that the resulting image generally looks better and ultimately results in better OCR performance when ConvertTo1BppFast is used even if the image being processed is not guaranteed to be black and white only. However, most of our images are in grayscale. This was an interesting discovery and I wanted to make it aware to you.

Has ConvertTo1Bpp been improved in recently releases?

I am a couple minor releases behind the latest. I will be upgrading soon but not immediately. So, for the time being I am seeing it better that we stick with ConvertTo1BppFast and just offer an option in our application where the user can switch/try the ConvertTo1Bpp option if they get entirely black images after the conversion is performed.

Mark