/// <summary>
		/// Convert the image into an array of strings using the passed settings
		/// </summary>
		/// <param name="image">image to convert</param>
		/// <param name="settings">the text settings to use for the output image</param>
		/// <returns>the converted text image</returns>
		public static string[] Convert(Image image, TextProcessingSettings settings)
		{
			if (image == null || settings.Width < 1 || settings.Height < 1)
				return null;

			byte[,] values = ImageToTextValues(image, settings.Size);

			return settings.Apply(values);
		}
		/// <summary>
		/// Convert the image into an array of strings using the passed size
		/// </summary>
		/// <remarks>Uses the default TextProcessingSettings</remarks>
		/// <param name="image">image to convert</param>
		/// <param name="size">size of the output text image</param>
		/// <returns>the converted text image</returns>
		public static string[] Convert(Image image, Size size)
		{
			if (image == null || size.Width < 1 || size.Height < 1)
				return null;

			TextProcessingSettings settings = new TextProcessingSettings();
			settings.Size = size;

			return Convert(image, settings);
		}
示例#3
0
        /// <summary>
        /// Convert the image into an array of strings using the passed settings
        /// </summary>
        /// <param name="image">image to convert</param>
        /// <param name="settings">the text settings to use for the output image</param>
        /// <returns>the converted text image</returns>
        public static string[] Convert(Image image, TextProcessingSettings settings)
        {
            if (image == null || settings.Width < 1 || settings.Height < 1)
            {
                return(null);
            }

            byte[,] values = ImageToTextValues(image, settings.Size);

            return(settings.Apply(values));
        }
示例#4
0
        /// <summary>
        /// Convert the image into an array of strings using the passed size
        /// </summary>
        /// <remarks>Uses the default TextProcessingSettings</remarks>
        /// <param name="image">image to convert</param>
        /// <param name="size">size of the output text image</param>
        /// <returns>the converted text image</returns>
        public static string[] Convert(Image image, Size size)
        {
            if (image == null || size.Width < 1 || size.Height < 1)
            {
                return(null);
            }

            TextProcessingSettings settings = new TextProcessingSettings();

            settings.Size = size;

            return(Convert(image, settings));
        }