象yhoo相册那样在网页上操作图片(不完全)_2

操作页面后面代码

None.gif protected  System.Web.UI.WebControls.Image MyImage;
None.gif        
// private System.Drawing.Image ResultImg = null;
None.gif
         private   void  Page_Load( object  sender, System.EventArgs e)
ExpandedBlockStart.gifContractedBlock.gif        
dot.gif {
InBlock.gif            
// 在此处放置用户代码以初始化页面
InBlock.gif
            if(!Page.IsPostBack)
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                urlStr.Value
="fileName=3_21165.jpg";
InBlock.gif                ChangImag();
ExpandedSubBlockEnd.gif            }

ExpandedBlockEnd.gif        }

None.gif
None.gif
None.gif        
None.gif        
private   void  Button1_Click( object  sender, System.EventArgs e)
ExpandedBlockStart.gifContractedBlock.gif        
dot.gif {
InBlock.gif            
string strFilename=string.Empty;
InBlock.gif            System.Drawing.Image  i;
InBlock.gif            strFilename 
= Server.MapPath("img/3_21165.jpg");
InBlock.gif 
InBlock.gif            i 
= System.Drawing.Image.FromFile(strFilename);
InBlock.gif 
InBlock.gif            System.Drawing.Bitmap b 
=new System.Drawing.Bitmap(500,600); 
InBlock.gif            Graphics g 
= System.Drawing.Graphics.FromImage(b); 
InBlock.gif            
InBlock.gif 
InBlock.gif            
//'切割图片
InBlock.gif
 
InBlock.gif            g.DrawImage(i,
new Rectangle(0,0,b.Width,b.Height),200,20,b.Width,b.Height,GraphicsUnit.Pixel);
InBlock.gif            
InBlock.gif 
InBlock.gif            Response.ContentType
="image/jpeg";
InBlock.gif 
InBlock.gif            b.Save(Server.MapPath(
"img/1.jpg"),System.Drawing.Imaging.ImageFormat.Jpeg);
InBlock.gif 
InBlock.gif            b.Dispose();
InBlock.gif            Response.Write(
"<script language='javascript'>alert('OK');</script>");
InBlock.gif
ExpandedBlockEnd.gif        }

None.gif
None.gif        
private   void  TurnOne_Click( object  sender, System.Web.UI.ImageClickEventArgs e)
ExpandedBlockStart.gifContractedBlock.gif        
dot.gif {
ContractedSubBlock.gifExpandedSubBlockStart.gif            
//翻转#region//翻转
InBlock.gif            
string goUrl=urlStr.Value;
InBlock.gif            
int i=goUrl.IndexOf("ring");
InBlock.gif            
if(i==-1)
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                goUrl 
+="&ring=Rotate180FlipY";
ExpandedSubBlockEnd.gif            }

InBlock.gif            
else
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                
string donum=null;
InBlock.gif                
for(int j=i+5;j<goUrl.Length;j++)
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    
if(goUrl.Substring(j,1)!="&")
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
dot.gif{
InBlock.gif                        donum 
+=goUrl.Substring(j,1);
ExpandedSubBlockEnd.gif                    }

InBlock.gif                    
else
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
dot.gif{
InBlock.gif                        
break;
ExpandedSubBlockEnd.gif                    }

ExpandedSubBlockEnd.gif                }

InBlock.gif                
switch(donum)
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    
case "Rotate90FlipNone":                        
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate90FlipNone","&ring=Rotate90FlipX");
InBlock.gif                        
break;
InBlock.gif                    
case"Rotate180FlipNone":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate180FlipNone","&ring=Rotate180FlipX");
InBlock.gif                        
break;
InBlock.gif                    
case "Rotate270FlipNone":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate270FlipNone","&ring=Rotate90FlipY");
InBlock.gif                        
break;
InBlock.gif
InBlock.gif                    
case "Rotate90FlipX":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate90FlipX","&ring=Rotate90FlipNone");
InBlock.gif                        
break;
InBlock.gif                    
case "Rotate180FlipX":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate180FlipX","&ring=Rotate180FlipNone");
InBlock.gif                        
break;
InBlock.gif                    
case "Rotate270FlipX":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate270FlipX","&ring=Rotate90FlipXY");
InBlock.gif                        
break;
InBlock.gif                    
case "RotateNoneFlipX":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=RotateNoneFlipX","");
InBlock.gif                        
break;
InBlock.gif
InBlock.gif
InBlock.gif                    
case "Rotate90FlipY":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate90FlipY","&ring=Rotate270FlipNone");
InBlock.gif                        
break;
InBlock.gif                    
case "Rotate180FlipY":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate180FlipY","");
InBlock.gif                        
break;
InBlock.gif                    
case "Rotate270FlipY":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate270FlipY","&ring=Rotate90FlipNone");
InBlock.gif                        
break;
InBlock.gif                    
case "RotateNoneFlipY":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=RotateNoneFlipY","&ring=Rotate180FlipNone");
InBlock.gif                        
break;
InBlock.gif
InBlock.gif                    
case "Rotate90FlipXY":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate90FlipXY","&ring=Rotate270FlipX");
InBlock.gif                        
break;
InBlock.gif                    
case "Rotate180FlipXY":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate180FlipXY","&ring=RotateNoneFlipX");
InBlock.gif                        
break;
InBlock.gif                    
case "Rotate270FlipXY":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate270FlipXY","&ring=Rotate90FlipX");
InBlock.gif                        
break;
InBlock.gif                    
case "RotateNoneFlipXY":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=RotateNoneFlipXY","&ring=RotateNoneFlipY");
InBlock.gif                        
break;
ExpandedSubBlockEnd.gif                }

ExpandedSubBlockEnd.gif            }

ExpandedSubBlockEnd.gif            
#endregion

InBlock.gif            urlStr.Value
=goUrl;
InBlock.gif            ChangImag();
ExpandedBlockEnd.gif        }

None.gif        
private   void  ChangImag()
ExpandedBlockStart.gifContractedBlock.gif        
dot.gif {
InBlock.gif            MyImage.ImageUrl
="MyImg.aspx?"+urlStr.Value;
ExpandedBlockEnd.gif        }

None.gif
None.gif        
private   void  GoRr_Click( object  sender, System.Web.UI.ImageClickEventArgs e)
ExpandedBlockStart.gifContractedBlock.gif        
dot.gif {
ContractedSubBlock.gifExpandedSubBlockStart.gif            
//顺时钟#region//顺时钟
InBlock.gif            
string goUrl=urlStr.Value;
InBlock.gif            
int i=goUrl.IndexOf("ring");
InBlock.gif            
if(i==-1)
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                goUrl 
+="&ring=Rotate90FlipNone";
ExpandedSubBlockEnd.gif            }

InBlock.gif            
else
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                
string donum=null;
InBlock.gif                
for(int j=i+5;j<goUrl.Length;j++)
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    
if(goUrl.Substring(j,1)!="&")
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
dot.gif{
InBlock.gif                        donum 
+=goUrl.Substring(j,1);
ExpandedSubBlockEnd.gif                    }

InBlock.gif                    
else
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
dot.gif{
InBlock.gif                        
break;
ExpandedSubBlockEnd.gif                    }

ExpandedSubBlockEnd.gif                }

InBlock.gif                
switch(donum)
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    
case "Rotate90FlipNone":                        
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate90FlipNone","&ring=Rotate180FlipNone");
InBlock.gif                        
break;
InBlock.gif                    
case"Rotate180FlipNone":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate180FlipNone","&ring=Rotate270FlipNone");
InBlock.gif                        
break;
InBlock.gif                    
case "Rotate270FlipNone":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate270FlipNone","");
InBlock.gif                        
break;
InBlock.gif
InBlock.gif                    
case "Rotate90FlipX":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate90FlipX","&ring=RotateNoneFlipX");
InBlock.gif                        
break;
InBlock.gif                    
case "Rotate180FlipX":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate180FlipX","&ring=Rotate90FlipX");
InBlock.gif                        
break;
InBlock.gif                    
case "Rotate270FlipX":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate270FlipX","&ring=Rotate180FlipX");
InBlock.gif                        
break;
InBlock.gif                    
case "RotateNoneFlipX":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=RotateNoneFlipX","&ring=Rotate270FlipX");
InBlock.gif                        
break;
InBlock.gif
InBlock.gif                    
case "Rotate90FlipY":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate90FlipY","&ring=RotateNoneFlipY");
InBlock.gif                        
break;
InBlock.gif                    
case "Rotate180FlipY":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate180FlipY","&ring=Rotate90FlipY");
InBlock.gif                        
break;
InBlock.gif                    
case "Rotate270FlipY":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate270FlipY","&ring=Rotate180FlipY");
InBlock.gif                        
break;
InBlock.gif                    
case "RotateNoneFlipY":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=RotateNoneFlipY","&ring=Rotate270FlipY");
InBlock.gif                        
break;
InBlock.gif
InBlock.gif                    
case "Rotate90FlipXY":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate90FlipXY","&ring=Rotate180FlipXY");
InBlock.gif                        
break;
InBlock.gif                    
case "Rotate180FlipXY":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate180FlipXY","&ring=Rotate270FlipXY");
InBlock.gif                        
break;
InBlock.gif                    
case "Rotate270FlipXY":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate270FlipXY","&ring=RotateNoneFlipXY");
InBlock.gif                        
break;
InBlock.gif                    
case "RotateNoneFlipXY":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=RotateNoneFlipXY","&ring=Rotate90FlipXY");
InBlock.gif                        
break;
ExpandedSubBlockEnd.gif                }

ExpandedSubBlockEnd.gif            }

ExpandedSubBlockEnd.gif            
#endregion

InBlock.gif            urlStr.Value
=goUrl;
InBlock.gif            ChangImag();
InBlock.gif            
ExpandedBlockEnd.gif        }

None.gif
None.gif        
private   void  GoRl_Click( object  sender, System.Web.UI.ImageClickEventArgs e)
ExpandedBlockStart.gifContractedBlock.gif        
dot.gif {
ContractedSubBlock.gifExpandedSubBlockStart.gif            
//逆时钟#region//逆时钟
InBlock.gif            
string goUrl=urlStr.Value;
InBlock.gif            
int i=goUrl.IndexOf("ring");
InBlock.gif            
if(i==-1)
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                goUrl 
+="&ring=Rotate270FlipNone";
ExpandedSubBlockEnd.gif            }

InBlock.gif            
else
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                
string donum=null;
InBlock.gif                
for(int j=i+5;j<goUrl.Length;j++)
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    
if(goUrl.Substring(j,1)!="&")
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
dot.gif{
InBlock.gif                        donum 
+=goUrl.Substring(j,1);
ExpandedSubBlockEnd.gif                    }

InBlock.gif                    
else
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
dot.gif{
InBlock.gif                        
break;
ExpandedSubBlockEnd.gif                    }

ExpandedSubBlockEnd.gif                }

InBlock.gif                
switch(donum)
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    
case "Rotate90FlipNone":                        
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate90FlipNone","");
InBlock.gif                        
break;
InBlock.gif                    
case"Rotate180FlipNone":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate180FlipNone","&ring=Rotate90FlipNone");
InBlock.gif                        
break;
InBlock.gif                    
case "Rotate270FlipNone":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate270FlipNone","&ring=Rotate180FlipNone");
InBlock.gif                        
break;
InBlock.gif
InBlock.gif                    
case "RotateNoneFlipX":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=RotateNoneFlipX","&ring=Rotate90FlipX");
InBlock.gif                        
break;
InBlock.gif                    
case "Rotate90FlipX":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate90FlipX","&ring=Rotate180FlipX");
InBlock.gif                        
break;
InBlock.gif                    
case "Rotate180FlipX":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate180FlipX","&ring=Rotate270FlipX");
InBlock.gif                        
break;
InBlock.gif                    
case "Rotate270FlipX":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate270FlipX","&ring=RotateNoneFlipX");
InBlock.gif                        
break;
InBlock.gif
InBlock.gif                    
case "RotateNoneFlipY":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=RotateNoneFlipY","&ring=Rotate90FlipY");
InBlock.gif                        
break;
InBlock.gif                    
case "Rotate90FlipY":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate90FlipY","&ring=Rotate180FlipY");
InBlock.gif                        
break;
InBlock.gif                    
case "Rotate180FlipY":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate180FlipY","&ring=Rotate270FlipY");
InBlock.gif                        
break;
InBlock.gif                    
case "Rotate270FlipY":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate270FlipY","&ring=RotateNoneFlipY");
InBlock.gif                        
break;
InBlock.gif
InBlock.gif                    
case "RotateNoneFlipXY":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=RotateNoneFlipXY","&ring=Rotate270FlipXY");
InBlock.gif                        
break;
InBlock.gif                    
case "Rotate90FlipXY":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate90FlipXY","&ring=RotateNoneFlipXY");
InBlock.gif                        
break;
InBlock.gif                    
case "Rotate180FlipXY":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate180FlipXY","&ring=Rotate90FlipXY");
InBlock.gif                        
break;
InBlock.gif                    
case "Rotate270FlipXY":
InBlock.gif                        goUrl
=goUrl.Replace("&ring=Rotate270FlipXY","&ring=Rotate180FlipXY");
InBlock.gif                        
break;
ExpandedSubBlockEnd.gif                }

ExpandedSubBlockEnd.gif            }

ExpandedSubBlockEnd.gif            
#endregion

InBlock.gif            urlStr.Value
=goUrl;
InBlock.gif            ChangImag();
ExpandedBlockEnd.gif        }

None.gif
None.gif        
private   void  ContCut_Click( object  sender, System.Web.UI.ImageClickEventArgs e)
ExpandedBlockStart.gifContractedBlock.gif        
dot.gif {
ContractedSubBlock.gifExpandedSubBlockStart.gif            
对比减小#region 对比减小
InBlock.gif            
string goUrl=urlStr.Value;
InBlock.gif            
int i=goUrl.IndexOf("Contrast");
InBlock.gif            
string donum=null;
InBlock.gif            
if(i==-1)
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                goUrl 
+="&Contrast=-0.1";
ExpandedSubBlockEnd.gif            }

InBlock.gif            
else
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{            
InBlock.gif                
for(int j=i+9;j<goUrl.Length;j++)
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    
if(goUrl.Substring(j,1)!="&")
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
dot.gif{
InBlock.gif                        donum 
+=goUrl.Substring(j,1);
ExpandedSubBlockEnd.gif                    }

InBlock.gif                    
else
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
dot.gif{
InBlock.gif                        
break;
ExpandedSubBlockEnd.gif                    }

ExpandedSubBlockEnd.gif                }

InBlock.gif                
double brightnum=0;
InBlock.gif                
try
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    brightnum
=double.Parse(donum);
ExpandedSubBlockEnd.gif                }

InBlock.gif                
catch
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    brightnum
=0;
ExpandedSubBlockEnd.gif                }

InBlock.gif                
if(brightnum>-1&&brightnum<=1)
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    brightnum
-=0.1;
ExpandedSubBlockEnd.gif                }

InBlock.gif                goUrl
=goUrl.Replace("&Contrast="+donum,"&Contrast="+brightnum.ToString());
ExpandedSubBlockEnd.gif            }

InBlock.gif            urlStr.Value
=goUrl;
InBlock.gif            ChangImag();
ExpandedSubBlockEnd.gif            
#endregion

ExpandedBlockEnd.gif        }

None.gif
None.gif        
private   void  ContAdd_Click( object  sender, System.Web.UI.ImageClickEventArgs e)
ExpandedBlockStart.gifContractedBlock.gif        
dot.gif {
ContractedSubBlock.gifExpandedSubBlockStart.gif            
对比增加#region 对比增加
InBlock.gif            
string goUrl=urlStr.Value;
InBlock.gif            
int i=goUrl.IndexOf("Contrast");
InBlock.gif            
string donum=null;
InBlock.gif            
if(i==-1)
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                goUrl 
+="&Contrast=0.1";
ExpandedSubBlockEnd.gif            }

InBlock.gif            
else
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{            
InBlock.gif                
for(int j=i+9;j<goUrl.Length;j++)
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    
if(goUrl.Substring(j,1)!="&")
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
dot.gif{
InBlock.gif                        donum 
+=goUrl.Substring(j,1);
ExpandedSubBlockEnd.gif                    }

InBlock.gif                    
else
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
dot.gif{
InBlock.gif                        
break;
ExpandedSubBlockEnd.gif                    }

ExpandedSubBlockEnd.gif                }

InBlock.gif                
double brightnum=0;
InBlock.gif                
try
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    brightnum
=double.Parse(donum);
ExpandedSubBlockEnd.gif                }

InBlock.gif                
catch
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    brightnum
=0;
ExpandedSubBlockEnd.gif                }

InBlock.gif                
if(brightnum>=-1&&brightnum<1)
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    brightnum
+=0.1;
ExpandedSubBlockEnd.gif                }

InBlock.gif                goUrl
=goUrl.Replace("&Contrast="+donum,"&Contrast="+brightnum.ToString());
ExpandedSubBlockEnd.gif            }

InBlock.gif            urlStr.Value
=goUrl;
InBlock.gif            ChangImag();
ExpandedSubBlockEnd.gif            
#endregion

ExpandedBlockEnd.gif        }

None.gif
None.gif        
private   void  BrightAdd_Click( object  sender, System.Web.UI.ImageClickEventArgs e)
ExpandedBlockStart.gifContractedBlock.gif        
dot.gif {
ContractedSubBlock.gifExpandedSubBlockStart.gif            
亮度增加#region 亮度增加
InBlock.gif            
string goUrl=urlStr.Value;
InBlock.gif            
int i=goUrl.IndexOf("Bright");
InBlock.gif            
string donum=null;
InBlock.gif            
if(i==-1)
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                goUrl 
+="&Bright=1.1";
ExpandedSubBlockEnd.gif            }

InBlock.gif            
else
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{            
InBlock.gif                
for(int j=i+7;j<goUrl.Length;j++)
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    
if(goUrl.Substring(j,1)!="&")
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
dot.gif{
InBlock.gif                        donum 
+=goUrl.Substring(j,1);
ExpandedSubBlockEnd.gif                    }

InBlock.gif                    
else
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
dot.gif{
InBlock.gif                        
break;
ExpandedSubBlockEnd.gif                    }

ExpandedSubBlockEnd.gif                }

InBlock.gif                
double brightnum=1;
InBlock.gif                
try
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    brightnum
=double.Parse(donum);
ExpandedSubBlockEnd.gif                }

InBlock.gif                
catch
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    brightnum
=1;
ExpandedSubBlockEnd.gif                }

InBlock.gif                
if(brightnum>=0&&brightnum<3)
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    brightnum
+=0.1;
ExpandedSubBlockEnd.gif                }

InBlock.gif                goUrl
=goUrl.Replace("&Bright="+donum,"&Bright="+brightnum.ToString());
ExpandedSubBlockEnd.gif            }

InBlock.gif            urlStr.Value
=goUrl;
InBlock.gif            ChangImag();
ExpandedSubBlockEnd.gif            
#endregion

ExpandedBlockEnd.gif        }

None.gif
None.gif        
private   void  BrightCut_Click( object  sender, System.Web.UI.ImageClickEventArgs e)
ExpandedBlockStart.gifContractedBlock.gif        
dot.gif {
ContractedSubBlock.gifExpandedSubBlockStart.gif            
亮度减少#region 亮度减少
InBlock.gif            
string goUrl=urlStr.Value;
InBlock.gif            
int i=goUrl.IndexOf("Bright");
InBlock.gif            
if(i==-1)
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                goUrl 
+="&Bright=0.9";
ExpandedSubBlockEnd.gif            }

InBlock.gif            
else
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                
string donum=null;
InBlock.gif                
for(int j=i+7;j<goUrl.Length;j++)
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    
if(goUrl.Substring(j,1)!="&")
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
dot.gif{
InBlock.gif                        donum 
+=goUrl.Substring(j,1);
ExpandedSubBlockEnd.gif                    }

InBlock.gif                    
else
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
dot.gif{
InBlock.gif                        
break;
ExpandedSubBlockEnd.gif                    }

ExpandedSubBlockEnd.gif                }

InBlock.gif                
double brightnum=1;
InBlock.gif                
try
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    brightnum
=double.Parse(donum);
ExpandedSubBlockEnd.gif                }

InBlock.gif                
catch
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    brightnum
=1;
ExpandedSubBlockEnd.gif                }

InBlock.gif                
if(brightnum>0&&brightnum<=3)
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    brightnum
-=0.1;
ExpandedSubBlockEnd.gif                }

InBlock.gif                goUrl
=goUrl.Replace("&Bright="+donum,"&Bright="+brightnum.ToString());
ExpandedSubBlockEnd.gif            }

InBlock.gif            urlStr.Value
=goUrl;
InBlock.gif            ChangImag();
ExpandedSubBlockEnd.gif            
#endregion

ExpandedBlockEnd.gif        }



转载于:https://www.cnblogs.com/cerxp/archive/2004/12/23/80870.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值