Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C# ͼƬ²Ã¼ô

/// <summary>
/// ËõС²Ã¼ôͼƬ
/// </summary>
/// <param name="int_Width">ÒªËõС²Ã¼ôͼƬ¿í¶È</param>
/// <param name="int_Height">ÒªËõС²Ã¼ôͼƬ³¤¶È</param>
/// <param name="input_ImgUrl">Òª´¦ÀíͼƬ·¾¶</param>
/// <param name="out_ImgUrl">´¦ÀíÍê±ÏͼƬ·¾¶</param>
public void ImgReduceCutOut(int int_Width, int int_Height, string input_ImgUrl, string out_ImgUrl)
{
// £½£½£½ÉÏ´«±ê׼ͼ´óС£½£½£½
int int_Standard_Width = 160;
int int_Standard_Height = 160;
int Reduce_Width = 0; // ËõСµÄ¿í¶È
int Reduce_Height = 0; // ËõСµÄ¸ß¶È
int CutOut_Width = 0; // ²Ã¼ôµÄ¿í¶È
int CutOut_Height = 0; // ²Ã¼ôµÄ¸ß¶È
int level = 100; //ËõÂÔͼµÄÖÊÁ¿ 1-100µÄ·¶Î§
// £½£½£½»ñµÃËõС£¬²Ã¼ô´óС£½£½£½
if (int_Standard_Height * int_Width / int_Standard_Width > int_Height)
{
Reduce_Width = int_Width;
Reduce_Height = int_Standard_Height * int_Width / int_Standard_Width;
CutOut_Width = int_Width;
CutOut_Height = int_Height;
}
else if (int_Standard_Height * int_Width / int_Standard_Width < int_Height)
{
Reduce_Width = int_Standard_Width * int_Height / int_Standard_Height;
Reduce_Height = int_Height;
CutOut_Width = int_Width;
CutOut_Height = int_Height;
}
else
{
Reduce_Width = int_Width;
Reduce_Height = int_Height;
CutOut_Width = int_Width;
CutOut_Height = int_Height;
}
// £½£½£½Í¨¹ýÁ¬½Ó´´½¨Image¶ÔÏó£½£½£½
System.Drawing.Image oldimage = System.Drawing.Image.fromFile(Server.MapPath(input_ImgUrl));


Ïà¹ØÎĵµ£º

C#¶ÁдAccessÊý¾Ý¿âµÄOLE¶ÔÏó×Ö¶Î

£¨Ò»£©°ÑÎļþÄÚÈÝдÈëAccessÊý¾Ý¿âµÄOLE¶ÔÏó×Ö¶ÎÖУº
if (File.Exists(txtBrow.Text) != false)   // Îı¾¿òtxtBrowÖÐÄÚÈÝΪÎļþ·¾¶¼°ÎļþÃû
{
     //»ñÈ¡Îļþºó׺
     FileInfo p = new FileInfo(txtBrow.Text.Trim());
     F_str_Type = ......

C# ͨ¹ýxslת»»´óxmlÎļþ·½·¨

ͨ¹ýxslת»»´óxmlÎļþ
Õ⼸ÌìÔÚ×öÕâ¸ö£¬ÍøÉϵö·½·¨ÎÒ¶¼ÊÔ¹ýÁË£¬»ã×ÜÈçÏÂ
·½·¨Ò»£º
XPathDocument myXPathDoc = new XPathDocument(tbXMLFile.Text);
 
XslCompiledTransform myXslTrans = new XslCompiledTransform();
myXslTrans.Load(tbXSLFile.Text);
 
XmlTextWriter myWriter = new XmlTextWrit ......

ÓÃC#´´½¨XML[¼òµ¥´úÂë]

XmlDocument doc = new XmlDocument();
XmlDeclaration dec = doc.CreateXmlDeclaration("1.0", "GB2312", null);
doc.AppendChild(dec);
//´´½¨Ò»¸ö¸ù½Úµã£¨Ò»¼¶£©
XmlElement root = doc.CreateElement("First");
doc.AppendChild(root);
//´´½¨½Úµã£ ......

C#µ÷ÓÃDLL £¨strmagic£©

¡¡¡¡´ó¼ÒÔÚʵ¼Ê¹¤×÷ѧϰC#µÄʱºò£¬¿ÉÄÜ»áÎÊ£ºÎªÊ²Ã´ÎÒÃÇҪΪһЩÒѾ­´æÔڵŦÄÜ£¨±ÈÈçWindowsÖеÄһЩ¹¦ÄÜ£¬C++ÖÐÒѾ­±àдºÃµÄһЩ·½·¨£©ÒªÖØÐ±àд´úÂ룬C#ÓÐûÓз½·¨¿ÉÒÔÖ±½Ó¶¼ÓÃÕâЩԭ±¾ÒѾ­´æÔڵŦÄÜÄØ£¿´ð°¸Êǿ϶¨µÄ£¬´ó¼Ò¿ÉÒÔͨ¹ýC#ÖеÄDllImportÖ±½Óµ÷ÓÃÕâЩ¹¦ÄÜ¡£
¡¡¡¡DllImportËùÔÚµÄÃû×Ö¿Õ¼ä using System.Runt ......

c#ÖÐÒ»¸ö´°Ìåµ÷ÓÃÁíÒ»¸ö´°ÌåµÄ¿Ø¼þ¼°·½·¨£¨×ªÌù£©

²Î¿¼×ÊÁÏ£ºhttp://wenwen.soso.com/z/q39607884.htm
ÈçºÎÔÚÒ»¸ö´°ÌåÖе÷ÓÃÁíÒ»¸ö´°ÌåµÄ¿Ø¼þ»ò·½·¨
´ð°¸ÊÇ´Ó¹¹Ô캯ÊýÖд«µÝ²ÎÊý¡£
Òª°ÑForm1ÖеĿؼä¸Ä³ÉpublicÊôÐÔ
¾ßÌåʵÏÖ¹ý³ÌÇë²Î¿´Ò»Ï´úÂë(ÔÚform2µÄtextbox1ÖÐÊäÈëÈ»ºóÔÚform1ÖеÄlabel1ÖÐÏÔʾtextboxÖеÄÄÚÈÝ
//form1´úÂë,form1ÖÐÓÐÒ»¸ölabel1ºÍÒ»¸öbutton1,Æä ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ