ASP.NET学习社区ASP.NET下载区ASP.NET源码 asp.net拍大头帖的解决方案问题解决中。。。

1  /  1  页   1 跳转 查看:370

asp.net拍大头帖的解决方案问题解决中。。。

asp.net拍大头帖的解决方案问题解决中。。。

原文提供的代码的确有问题

我根据原文的图片找到站长的博客

然后下载了她的源码 哈哈

在里面找到了大头贴部分代码

现在测试成功 呼呼 等会整理下发上来
 

回复:asp.net拍大头帖的解决方案问题解决中。。。

flash发布时的错误 不修改也是这个错误。

**错误** 符号=loaderWindow, 图层=Layer 7, 帧=1:第 1 行: 无法加载类或接口'it.sephiroth.mloaderWindow'

ActionScript 错误总数:3      报错:3
 

回复: asp.net拍大头帖的解决方案问题解决中。。。

MakePic.aspx.cs代码如下

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.IO;
using System.Text;
public partial class MakePic : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
int width = 0;
int height = 0;

int.TryParse(Request.Form["width"],out width);
int.TryParse(Request.Form["height"], out height);


Bitmap bmp = new Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
Rectangle rect = new Rectangle(0, 0, width, height);



int iBytes = width * height * 3;
byte[] PixelValues = new byte[iBytes];

int iPoint = 0;

bmp.MakeTransparent(Color.White);
for (int i = 0; i < height; i++)
{
string[] ss=Request.Form["px"+i].Split(',');
for (int j = 0; j < width; j++)
{
string values = ss[j];
while (values.Length < 6)
{
values = "0" + values;
}
string s1, s2, s3;
s1 = values.Substring(0, 2);
s2 = values.Substring(2, 2);
s3 = values.Substring(4, 2);

PixelValues[iPoint] = Convert.ToByte(Convert.ToInt32(s1,16));
PixelValues[iPoint+1] = Convert.ToByte(Convert.ToInt32(s2, 16));
PixelValues[iPoint+2] = Convert.ToByte(Convert.ToInt32(s3, 16));
bmp.SetPixel(j, i, Color.FromArgb(PixelValues[iPoint], PixelValues[iPoint + 1], PixelValues[iPoint + 2]));
iPoint += 3;

}
}
string path = "img/" + DateTime.Now.ToFileTime() + ".JPG";
bmp.Save(Server.MapPath(path), ImageFormat.Jpeg);
Response.Write("拍照成功,保存于:" + path);
Response.Write("
");
}
}


 

回复:asp.net拍大头帖的解决方案问题解决中。。。

有心人啊!
应该是这个小程序一直完善中。
替需要这个程序的人谢谢lz了
http://www.Aspx1.Com
请帮忙宣传Aspx1 , Aspx1是ASP.NET学习者的家园 , 适宜长期居住.
 

回复:asp.net拍大头帖的解决方案问题解决中。。。

呵呵 我还是特别感谢你啊

我的.net一直停滞不前 但是你的这个源码激发了我的兴趣

我赶紧开始进步了 很多问题迎刃而解啊!
 
1  /  1  页   1 跳转

版权所有 ASP.NET学习门户 2.0.1214   Sitemap  

返顶部