示例#1
0
 /// <summary>
 /// Generates the image with given image properties
 /// </summary>
 /// <param name="captchaCode">Captcha code for which the image has to be generated</param>
 /// <param name="imageHeight">Height of the image to be generated</param>
 /// <param name="imageWidth">Width of the image to be generated</param>
 /// <param name="fontSize">Font size to be used</param>
 /// <returns>Generated jpeg image as a MemoryStream object</returns>
 public static MemoryStream GenerateImage(string captchaCode, int imageHeight, int imageWidth, int fontSize)
 {
     return(ImageFactory.BuildImage(captchaCode, imageHeight, imageWidth, fontSize, Distortion));
 }
示例#2
0
 /// <summary>
 /// Generates the image with default image properties(150px X 96px) and distortion
 /// </summary>
 /// <param name="captchaCode">Captcha code for which the image has to be generated</param>
 /// <returns>Generated jpeg image as a MemoryStream object</returns>
 public static MemoryStream GenerateImage(string captchaCode)
 {
     return(ImageFactory.BuildImage(captchaCode, HEIGHT, WIDTH, FONTSIZE, Distortion));
 }