How to create a iTextSharp.text.Image object startng to a System.Drawing.Bitmap object?

后端 未结 1 719
悲哀的现实
悲哀的现实 2021-01-17 12:34

I am pretty new in iTextSharp (the C# version of iText):

I have something like this:

System.Drawing.Bitmap bitmap =         


        
相关标签:
1条回答
  • 2021-01-17 13:10

    There are no overloads that take just a System.Drawing.Image. You need to used one of these:

    GetInstance(System.Drawing.Image image, BaseColor color)
    GetInstance(System.Drawing.Image image, BaseColor color, bool forceBW)
    GetInstance(System.Drawing.Image image, System.Drawing.Imaging.ImageFormat format)
    

    The first one is probably the best choice and I'm 99% sure you can pass null for the color parameter.

    0 讨论(0)
提交回复
热议问题