コード例 #1
0
ファイル: Rgb.cs プロジェクト: goupviet/dot-imaging
 public static void Convert(Rgb <byte> rgb, ref Bgr <byte> bgr)
 {
     rgb.R = bgr.R;
     rgb.G = bgr.G;
     rgb.B = bgr.B;
 }
コード例 #2
0
 /// <summary>
 /// Converts the source color to the destination color.
 /// </summary>
 /// <param name="image">Source image.</param>
 /// <returns>image with converted color.</returns>
 public static Bgr <byte>[,] ToBgr(this Rgb <byte>[,] image)
 {
     return(image.Convert <Rgb <byte>, Bgr <byte> >(Rgb <byte> .Convert));
 }
コード例 #3
0
 /// <summary>
 /// Converts the source color to the destination color.
 /// </summary>
 /// <param name="image">Source image.</param>
 /// <param name="area">Working area.</param>
 /// <returns>image with converted color.</returns>
 public static Bgr <byte>[,] ToBgr(this Rgb <byte>[,] image, Rectangle area)
 {
     return(image.Convert <Rgb <byte>, Bgr <byte> >(Rgb <byte> .Convert, area));
 }
コード例 #4
0
 /// <summary>
 /// Converts the source channel depth to the destination channel depth.
 /// </summary>
 /// <typeparam name="TDepth">Destination channel depth.</typeparam>
 /// <param name="image">Image.</param>
 /// <returns>Image with converted element depth.</returns>
 public static Rgb <TDepth>[,] Cast <TDepth>(this Rgb <double>[,] image)
 where TDepth : struct
 {
     return(image.ConvertChannelDepth <Rgb <double>, Rgb <TDepth> >());
 }