var rectDest = new Rectangle( 0, 0, this.m_bitmap_source.Width, this.m_bitmap_source.Height );You can use Threshold effect too (replace row with Gamma):
using ( var graphics = Graphics.FromImage( this.m_bitmap_dest ) ) using ( var attr = new ImageAttributes() ) { attr.SetGamma( 0.2f ); graphics.DrawImage( this.m_bitmap_source, rectDest, 0, 0, this.m_bitmap_source.Width, this.m_bitmap_source.Height, GraphicsUnit.Pixel, attr ); }
attr.SetThreshold( 0.4f );
No comments:
Post a Comment