asp.netÖÐÈÃͼƬ°´±ÈÀýËõ·Å
asp.netÖÐÈÃͼƬ°´±ÈÀýËõ·Å
¿ØÖÆwidth ºÍ height
ÓÃjsËõ·Å
Image¿Õ¼äµÄ¿í£¬¸ß¶¯Ì¬Ð޸ġ¡
int_Width Ä㶨µÄ¿í
int_Height Ä㶨µÄ¸ß
input_ImgFile ΪÄãÉÏ´«µ½·þÎñÆ÷µÄÔʼͼ·¾¶
out_ImgFile ±£´æµÈ±ÈÀýËõ·ÅµÄͼµÄ·¾¶
C# code:
public static void Thumbnail (int int_Width, int int_Height, string input_ImgFile, string out_ImgFile)
{
System.Drawing.Image oldimage = System.Drawing.Image.fromFile(input_ImgFile);
float New_Width; // еĿí¶È
float New_Height; // еĸ߶È
float Old_Width,Old_Height; //Ôʼ¸ß¿í
int flat = 0;//±ê¼ÇͼƬÊDz»ÊǵȱÈ
int xPoint = 0;//Èô¹ûÒª²¹°×±ßµÄ»°£¬ÔͼÏñËùÔÚµÄx£¬y×ø±ê¡£
int yPoint=0;
//ÅжÏͼƬ
Old_Width = (float)oldimage.Width;
Old_Height = (float)oldimage.Height;
if ((Old_Width / Old_Height) > ((float)int_Width / (float)int_Height)) //µ±Í¼Æ¬Ì«¿íµÄʱºò
{
New_Height = Old_Height * ((float)int_Width / (float)Old_Width);
New_Width = (float)int_Width;
//´Ëʱx×ø±ê²»ÓÃÐÞ¸Ä
yPoint = (int)(((float)int_Height - New_Height) / 2);
flat
Ïà¹ØÎÊ´ð£º
select top 12 * from Product where [id] not in (select top 12 [id] from Product)
ÕâÑù¿ÉÒÔ·ÖÒ³£¬µ«ÊÇÎÒÔÚºóÃæÏë¼Ó¸öÌõ¼þ
select top 12 * from Product where [id] not in (select top 12 [id] from Prod ......
ÇëÎÊһϣ¬ASP.NETÎÒÓÃÒ»¸ö²ãÖзÅÁËÒ»¸öÈÕÀú¿Ø¼þ£¬ÔÚµãÒ»¸ö°´Å¥Ê±£¬ÏÔʾÕâ¸ö²ã£¿ÏÖÔÚÎÊÌâÊÇÎÒÔڵ㰴ťʱ£¬ÎÒÏë°Ñ²ãÏÔʾÔÚ°´Å¥µÄÏ·½£¿¾ÍÏñÏÂÀÈÕÆÚ¿Ø¼þÒ»Ñù£¬ÎÒÓÃÊǵÄASP.NET C#
ÎÒÓÐÕâôһ¸öÈÕÆÚ¿Ø¼þ£¬£¡µã»÷¿ÉÒÔÑ ......
ASP.NETÈçºÎÓÃÒ»¸ö°´Å¥ÊµÏÖÑ¡ÔñÎļþ¼Ð·¾¶µ½Îı¾¿òÖУ¿£¨×¢ÒâÊÇÎļþ¼Ð·¾¶£¬²»ÊÇÎļþ·¾¶£©
http://blog.csdn.net/xianfajushi/archive/2008/10/18/3094474.aspx
Õâ²»ÊÇÎÒÒªµÄЧ¹û£¬ÎÒÒªÓõÄÊÇÀàËÆÓÚÎļþÉÏ´«¿ÉÒ ......
ÎÒÊÇÓÃAspNetPagerÀàÍê³ÉµÄ ¿ÉÊÇÏëʵÏÖ°´Ê±¼ä˳ÐòÅÅÁÐ.
ÎÒÊÇÓÃlimit×öµÄ²éѯID×ÜÊý¸øAspNetPager
È»ºóÈÃËûÉú³ÉÒ³Êý.
select * from bbs limit 0,10 GROUP BY Mate
ÕâôÏÂÈ¥µÄ¿ÉÊÇ,ÎÒ²»Äܽâ¾ö°´Ê±¼äÅÅÐò,ÐÂÌù²»ÔÚ ......
Êý¾Ý¿â±íÖÐÓÐÒ»ÁУ¨TranXml£©ÀàÐÍÊÇxml£¬´æ´¢µÄÊÇÀàËÆ
<fathernode>
<a>aaa
</a>
<b>bbb
</b>
</fathernode>
µÄÐÅÏ¢£¬²¢ÇÒͨ¹ý²éѯ·½· ......