private static ImageCodecInfo GetCodec(ImageCodecs imagetype) { ImageCodecInfo ici = GetEncoderInfo("image/jpeg"); switch (imagetype) { case ImageCodecs.Jpeg: ici = GetEncoderInfo("image/jpeg"); break; case ImageCodecs.Tiff: ici = GetEncoderInfo("image/tiff"); break; case ImageCodecs.Gif: ici = GetEncoderInfo("image/gif"); break; case ImageCodecs.Png: ici = GetEncoderInfo("image/png"); break; case ImageCodecs.Bmp: ici = GetEncoderInfo("image/bmp"); break; } return(ici); }
public override void CaptureWebPageToFile(Stream stream, ImageCodecs imagetype, bool writeUrl, bool showGuides, int scalePercentage, int quality) { ImageType = imagetype; if (CallBaseCaptureWebPageToFile) { base.CaptureWebPageToFile(stream, imagetype, writeUrl, showGuides, scalePercentage, quality); } }
public virtual void CaptureWebPageToFile(Stream stream, ImageCodecs imagetype, bool writeUrl, bool showGuides, int scalePercentage, int quality) { var finalImage = CaptureWebPageImage(writeUrl, showGuides, scalePercentage); var eps = GetEncoderParams(quality); var ici = GetCodec(imagetype); SaveImage(finalImage, stream, ici, eps); }
public virtual void CaptureWebPageToFile(Stream stream, ImageCodecs imagetype, bool writeUrl, bool showGuides, int scalePercentage, int quality) { var finalImage = CaptureWebPageImage(writeUrl, showGuides, scalePercentage); var eps = GetEncoderParams(quality); var ici = GetCodec(imagetype); SaveImage(finalImage, stream, ici, eps); }
private static ImageCodecInfo GetCodec(ImageCodecs imagetype) { ImageCodecInfo ici = GetEncoderInfo("image/jpeg"); switch (imagetype) { case ImageCodecs.Jpeg: ici = GetEncoderInfo("image/jpeg"); break; case ImageCodecs.Tiff: ici = GetEncoderInfo("image/tiff"); break; case ImageCodecs.Gif: ici = GetEncoderInfo("image/gif"); break; case ImageCodecs.Png: ici = GetEncoderInfo("image/png"); break; case ImageCodecs.Bmp: ici = GetEncoderInfo("image/bmp"); break; } return ici; }
public override void CaptureWebPageToFile(Stream stream, ImageCodecs imagetype, bool writeUrl, bool showGuides, int scalePercentage, int quality) { ImageType = imagetype; if (CallBaseCaptureWebPageToFile) base.CaptureWebPageToFile(stream, imagetype, writeUrl, showGuides,scalePercentage,quality); }