How do I recolor an image? (see images)

后端 未结 7 676
没有蜡笔的小新
没有蜡笔的小新 2020-12-29 08:53

How do I achieve this kind of color replacement programmatically? \"replacing


So this i

7条回答
  •  死守一世寂寞
    2020-12-29 09:10

    This code project article covers this and more: http://www.codeproject.com/KB/GDI-plus/Image_Processing_Lab.aspx

    It uses the AForge.NET library to do a Hue filter on an image for a similar effect:

      // create filter
    
      AForge.Imaging.Filters.HSLFiltering filter =
          new AForge.Imaging.Filters.HSLFiltering( );
      filter.Hue = new IntRange( 340, 20 );
      filter.UpdateHue = false;
      filter.UpdateLuminance = false;
      // apply the filter
    
      System.Drawing.Bitmap newImage = filter.Apply( image );
    

提交回复
热议问题