convert bitonal TIFF to bitonal PNG in C#

前端 未结 5 1700
天涯浪人
天涯浪人 2021-01-12 10:00

I need to convert bitonal (black and white) TIFF files into another format for display by a web browser, currently we\'re using JPGs, but the format isn\'t crucial. From rea

5条回答
  •  孤街浪徒
    2021-01-12 10:39

    Have you tried PNG with 1 bit color depth?

    To achieve a size similar to a CCITT4 TIFF, I believe your image needs to use a 1-bit indexed pallette.

    However, you can't use the Graphics object in .NET to draw on an indexed image.

    You will probably have to use LockBits to manipulate each pixel.

    See Bob Powell's excellent article.

提交回复
热议问题