Pregunta

I'm trying to convert a Delphi code to C# and I wonder if there's an equivalent of VCL.Graphics.TBitmap.Monochrome property in C#?

It's explanation it says: Determines whether the bitmap displays its image in monochrome. If Monochrome is true if the bitmap displays as a monochrome bitmap. Monochrome is false if the bitmap displays in color, that is, if it contains more than one bit per pixel.

and C# doesn't have something like this I think.

If there's a workaround for this, what is it and how can it be done?

Thanks.

¿Fue útil?

Solución

The delphi one refers to the drawing of the image, so the equivilant is setting the ImageAttributes.

You just need to find a colour matrix for monochome.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top