如何经过后台处理 让清晰的图片变得模糊
如题 通过读取指定图片 进行处理后显示的图片变得模糊
有什么方法可以用吗。
[解决办法]
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Drawing;using System.Drawing.Imaging;namespace WebTest{ public partial class WebForm5 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { Bitmap img = new Bitmap(@"E:\Temp\psu (1).jpg"); SolidBrush pixelBrush; Graphics g = Graphics.FromImage(img); for (int i = 0; i < img.Width; i++) { for (int j = 0; j < img.Height; j++) { Color pixelColor = img.GetPixel(i-i%2, j-j%2); pixelBrush = new SolidBrush(pixelColor); g.FillRectangle(pixelBrush, i, j, 1, 1); } } Response.ContentType = "image/JPEG"; img.Save(Response.OutputStream, ImageFormat.Jpeg); Response.End(); } }}
[解决办法]
所有圖像控件都有這小兒科功能