Bitmap bt = new Bitmap(820, 240);
Graphics g = Graphics.FromImage(bt);
Pen bluepen = new Pen(Color.Red, 1);
MemoryStream tempStream = new MemoryStream();
if (Request.QueryString["id"].ToString() == "3220000701")
{
for (int i = 0; i < 820; i++)
{
for (int j = 0; j < 240; j++)
{
g.DrawRectangle(bluepen, i, j, 100, 100);
}
}
bt.Save(tempStream, ImageFormat.Png);
Response.BinaryWrite(tempStream.ToArray());
bt.Dispose();
g.Dispose();
tempStream.Dispose();
}
if (Request.QueryString["id"].ToString() == "3559022202")
{
for (int i = 0; i < 410; i++)
{
for (int j = 0; j < 240; j++)
{
g.DrawRectangle(bluepen, i, j, 100, 100);
}
}
bt.Save(tempStream, ImageFormat.Png);
Response.BinaryWrite(tempStream.ToArray());
bt.Dispose();
g.Dispose();
tempStream.Dispose();
}
if (Request.QueryString["id"].ToString() == "3559026701")
{
for (int i = 0; i < 820; i++)
{
for (int j = 0; j < 120; j++)
{
g.DrawRectangle(bluepen, i, j, 100, 100);
}
}
bt.Save(tempStream, ImageFormat.Png);
Response.BinaryWrite(tempStream.ToArray());
bt.Dispose();
g.Dispose();
tempStream.Dispose();
Graphics g = Graphics.FromImage(bt);
Pen bluepen = new Pen(Color.Red, 1);
MemoryStream tempStream = new MemoryStream();
if (Request.QueryString["id"].ToString() == "3220000701")
{
for (int i = 0; i < 820; i++)
{
for (int j = 0; j < 240; j++)
{
g.DrawRectangle(bluepen, i, j, 100, 100);
}
}
bt.Save(tempStream, ImageFormat.Png);
Response.BinaryWrite(tempStream.ToArray());
bt.Dispose();
g.Dispose();
tempStream.Dispose();
}
if (Request.QueryString["id"].ToString() == "3559022202")
{
for (int i = 0; i < 410; i++)
{
for (int j = 0; j < 240; j++)
{
g.DrawRectangle(bluepen, i, j, 100, 100);
}
}
bt.Save(tempStream, ImageFormat.Png);
Response.BinaryWrite(tempStream.ToArray());
bt.Dispose();
g.Dispose();
tempStream.Dispose();
}
if (Request.QueryString["id"].ToString() == "3559026701")
{
for (int i = 0; i < 820; i++)
{
for (int j = 0; j < 120; j++)
{
g.DrawRectangle(bluepen, i, j, 100, 100);
}
}
bt.Save(tempStream, ImageFormat.Png);
Response.BinaryWrite(tempStream.ToArray());
bt.Dispose();
g.Dispose();
tempStream.Dispose();