GdPictureImaging.ConvertTo1Bpp and dithering

Feature Requests for GdPicture.NET.
Post Reply
fms
Posts: 3
Joined: Thu Feb 19, 2009 7:48 pm

GdPictureImaging.ConvertTo1Bpp and dithering

Post by fms » Thu Feb 19, 2009 9:26 pm

Hi,

It would be very nice to have at least one overload for this method with a dithering algorithm behind it.

There's nothing wrong with converting color images to 1bbp using thresholds and it normally works just fine for "mostly text" images but as soon as we get into converting "real pictures" a.k.a. photos to 1bpp the threshold method is not giving the best results. There are plenty of dithering algorithms available and quite a few are in public domain so IP/patents shouldn't be a problem. With a few notable exceptions, they are relatively easy to implement as soon as one has access to the underlying raster data (that would be you :wink: ). I'm not picky, any error diffusion algo will do but Stucki or Burkes would be very nice.

Cheers,
Mike

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: GdPictureImaging.ConvertTo1Bpp and dithering

Post by Loïc » Fri Feb 20, 2009 4:00 pm

Hi Mike,

An order dither algorithm is already implemented. I added Stucki & Burkes implementation to the wish list.

Code: Select all

GdPictureImaging.FxBlackNWhite(ImageID, BitonalReduction.OrderedDither)
GdPictureImaging.ConvertTo1BppFast(m_ImageID)
Best regards,

Loïc

fms
Posts: 3
Joined: Thu Feb 19, 2009 7:48 pm

Re: GdPictureImaging.ConvertTo1Bpp and dithering

Post by fms » Fri Feb 20, 2009 5:46 pm

Hi Loïc,

Thank you for your answer.

I was so embarrassed by not noticing BitonalReduction.OrderedDither that I immediately went to Plimus and ordered GdPicture.NET Document Imaging. :wink:
Seriously speaking, the SDK does almost everything I need for now.

Have a nice weekend,
Mike

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: GdPictureImaging.ConvertTo1Bpp and dithering

Post by Loïc » Fri Feb 20, 2009 6:36 pm

Hi Mike,

Thank you for the feedback :wink:

Cheers,

Loïc

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: GdPictureImaging.ConvertTo1Bpp and dithering

Post by Loïc » Mon Feb 23, 2009 4:31 pm

Hi,

3 new dithering algorithms have been implemented: Stucki, Burke & Floyd Steinberg.

You can use them through the FxBlackNWhite() method of the last release: https://www.gdpicture.com/download/downl ... urenet.php


Best regards,

Loïc

fms
Posts: 3
Joined: Thu Feb 19, 2009 7:48 pm

Re: GdPictureImaging.ConvertTo1Bpp and dithering

Post by fms » Mon Feb 23, 2009 6:07 pm

Hi Loïc,

Amazing response time!

Thank you very much.

Kind regards,
Mike

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest