/// <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 Bgra <TDepth>[,] Cast <TDepth>(this Bgra <double>[,] image) where TDepth : struct { return(image.ConvertChannelDepth <Bgra <double>, Bgra <TDepth> >()); }