aspjpeg×é¼þ¼¼ÊõÔÚASPµÄÓ¦ÓÃʵÀý

·¢²¼Ê±¼ä:2007-07-11 14:37:17   ä¯ÀÀÈËÊý: 741970 ´Î  

¿ÉÒÔ²ÉÓÃASPµÄ×é¼þJPEGÀ´×ö£¬¿ÉÒÔÏÈ×öÒ»¸öͼƬ£¬ÉÏÃæÊÇÄãµÄÍøÕ¾LOGOÏà¹ØµÄ¶«Î÷£¬È»ºó½«ÎÄ×ÖдÔÚÉÏÃ棬ÒÔÏ·½·¨ËѼ¯Á˼¸ÖÖ·½·¨£¬´ó¼Ò¿ÉÒԲο¼Ò»Ï¡£


aspjpegµÄ¸ß¼¶Ó÷¨ÖУ¬°üÀ¨ÒÔϳ£Óü¼Êõ£º
ͼƬËõÂÔ  ͼƬˮӡ  °²È«Âë¼¼Êõ  ͼƬÇÐ¸î  Í¼Æ¬ºÏ²¢  Êý¾Ý¿âÖ§³ÖµÈ¡£

 

aspjpegΨһµã²»×ãµÄ¾ÍÊÇÊä³ö·½Ê½±È½Ïµ¥Ò»¡£ÔÚÕâÀÎÒÃÇÖ÷Ҫ̸½«Í¼Æ¬´¦Àí±£´æºóÔÙµ÷ÓõÄÕâÖÖÊä³ö·½·¨¡£ÁíÍ⣬±¾È˱ȽÏÀÁ£¬ËùÒÔÓÐЩ´úÂëÈÔÈ»ÒýÓÃÓÚÔ­Îĵµ£¬²»¶®µÄµØ·½Å¼»á¼ÓÒÔ½âÊÍ£¡


ѧ¹ývb»òÕß.netµÄͬ־¿Ï¶¨Ò»¿´¾ÍÃ÷°×ÁË¡£Ë¢×ÓÀ´×Å¡£ºÇºÇ¡£

Ò»¡¢Í¼Æ¬ËõÂÔ

<%
Set Jpeg = Server.CreateObject("Persits.Jpeg") µ÷ÓÃ×é¼þ
Path = Server.MapPath("images") & "clock.jpg" ´ý´¦ÀíͼƬ·¾¶
Jpeg.Open Path ´ò¿ªÍ¼Æ¬
¸ßÓë¿íΪԭͼƬµÄ1/2
Jpeg.Width = Jpeg.OriginalWidth / 2
Jpeg.Height = Jpeg.OriginalHeight / 2
±£´æͼƬ
Jpeg.Save Server.MapPath("images") & "clock_small.jpg"
%>
²é¿´´¦ÀíµÄͼƬ


¶þ¡¢Í¼Æ¬Ë®Ó¡

<%
Set Jpeg = Server.CreateObject("Persits.Jpeg")
Jpeg.Open Server.MapPath("images/dodge_viper.jpg")
¿ªÊ¼Ð´ÎÄ×Ö
Jpeg.Canvas.Font.Color = &000000' red ÑÕÉ«
Jpeg.Canvas.Font.Family = "Courier New" ×ÖÌå
Jpeg.Canvas.Font.Bold = True ÊÇ·ñ¼Ó´Ö
Jpeg.Canvas.Print 10, 10, "Copyright (c) XYZ, Inc."
´òÓ¡×ø±êx ´òÓ¡×ø±êy ÐèÒª´òÓ¡µÄ×Ö·û
ÒÔÏÂÊǶÔͼƬ½øÐб߿ò´¦Àí
Jpeg.Canvas.Pen.Color = &H000000' black ÑÕÉ«
Jpeg.Canvas.Pen.Width = 2 »­±Ê¿í¶È
Jpeg.Canvas.Brush.Solid = False ÊÇ·ñ¼Ó´Ö´¦Àí
Jpeg.Canvas.Bar 1, 1, Jpeg.Width, Jpeg.Height
ÆðʼX×ø±ê ÆðʼY×ø±ê ÊäÈ볤¶È ÊäÈë¸ß¶È
Jpeg.Save Server.MapPath("images/dodge_viper_framed.jpg") ±£´æ
%>


Èý¡¢°²È«Âë

°²È«ÂêµÄµÀÀíºÍ¼Óˮӡ²î²»¶à£¬ºÜ¶àÅóÓÑÎÊÎÒÒª¾ßÌåµÄ´úÂë¼¼Êõ£¬ÔÚÕâÀïºÍ´ó¼Ò·ÖÏí¡£
<%
Éú³É°²È«ÂëµÄº¯Êý
function make_randomize(max_len,w_n) max_len Éú³É³¤¶È£¬w_n£º0 ¿ÉÄÜ°üº¬×Öĸ£¬1£ºÖ»ÎªÊý×Ö
randomize
for intcounter=1 to max_len
whatnext=int((1-0+1)*rnd+w_n)
if whatnext=0 then
upper=122
lower=97
else
upper=57
lower=48
end if
strnewpass=strnewpass & chr(int((upper-lower+1)*rnd)+lower)
next
make_randomize=strnewpass
end function
%>

Éú³É°²È«ÂëµÄͼƬ¡£µ±È»ÄãÒªÔ¤ÏÈ×¼±¸Ò»Õű³¾°Í¼Å¶

<%random_num=make_randomize(4,1) Éú³É4λÊý×ֵݲȫÂë
session("random_num")=random_num Ϊʲôµ÷ÓÃsession£¬Ã»ÓÐsessionµÄ°²È«ÂëÊÇÍêȫûÓÐÒâÒåµÄ¡£ºÇºÇ

Set Jpeg = Server.CreateObject("Persits.Jpeg") µ÷ÓÃ×é¼þ
Jpeg.Open Server.MapPath("infos/random_pic/random_index.gif") ´ò¿ª×¼±¸µÄͼƬ
Jpeg.Canvas.Font.Color = &H006699
Jpeg.Canvas.Font.Family = "Arial Black"
Jpeg.Canvas.Font.Bold = false
Jpeg.Canvas.PrintText 0, -2, random_num
jpeg.save Server.MapPath("infos/random_pic/random_index.bmp") ±£´æ
%>

×Ô¼º×ö×ö¿´¡£ºÇºÇ¡£


ËÄ¡¢Í¼Æ¬Çиî

Ò»Ö±ÒÔÀ´£¬¶Ôaspjpeg²»Á˽âµÄÈËÒÔΪÊÇÎÞ·¨ÓÃËüÀ´½øÐÐÇиîµÄ¡£
ÆäʵÓÐÕâÑùµÄÒ»¸ö·½·¨µÄ
crop x1,y1,x2,y2
Çи·½ÐÍ×óÉϽÇx×ø±ê£¬y×ø±ê ÓÒϽÇx×ø±ê y×ø±ê
ÏÂÃæÎÒ¾Í×öÒ»¸öÑÝʾ¹þ
Set Jpeg = Server.CreateObject("Persits.Jpeg")
jpeg.open server.MapPath("/pic/1.gif")
jpeg.width=70
Jpeg.Height = Jpeg.OriginalHeight*70 / jpeg.Originawidth
jpeg.crop 0,0,70,52 ¿ªÊ¼ÇиîÆäʵÊǰѳ¬¹ý52ÏóËصÄϲ¿·ÖÈ¥µô
jpeg.save server.MapPath("/temp_pic/small_1.gif") ±£´æ

ÕâÑù¾ÍÐÐÁË¡£

 

Î塢ͼƬºÏ²¢

ÎÒÃÇÕâÀïÊÇÒª°ÑlogoͼƬ¼Óµ½dodge_viper.jpgͼƬÉÏÈ¥
Æäʵ£¬Í¼Æ¬ºÏ²¢µÄ·½·¨Ò²¿ÉÒÔÓÃÀ´¶¯Ì¬´òˮӡŶ
Set Photo = Server.CreateObject("Persits.Jpeg")
PhotoPath = Server.MapPath("images") & "dodge_viper.jpg"
Photo.Open PhotoPath
Set Logo = Server.CreateObject("Persits.Jpeg")
LogoPath = Server.MapPath("images") & "clock.jpg"
Logo.Open LogoPath
Logo.Width = 70
Logo.Height = Logo.Width * Logo.OriginalHeight / Logo.OriginalWidth

Photo.DrawImage 0, 0, Logo

Photo.SendBinary ÕâÀïÓÃÁËsendBinaryµÄÊä³ö·½·¨¡£
µ±È»£¬ÄãÒ²¿ÉÒÔÏȱ£´æ¸ü¸ÄºóµÄdodge_viper.jpg£¬ÔÙÊäÈëÒ²¿ÉÒÔ¡£
¸öÈ˲»´óϲ»¶ÓÃsendBinary·½·¨£¬ÔÚÍøËÙÂýµÄʱºòÈÝÒ׳ö´í¡£ÔÚËٶȷ½ÃæÒ²²»ÔõÑù¡£


Áù¡¢Êý¾Ý¿âÖ§³Ö

ÕâÀï²»¶à˵ÁË¡£Æäʵ¾ÍÊÇBinary·½·¨£¬´ó¼ÒÖªµÀͼƬ´æ½øÊý¾Ý¿âÖ»ÄÜ´æΪ¶þ½øÖƵÄÎļþµÄ¡£

 

Æß¡¢¸ü¶à·½·¨½éÉÜ

Canvas.Line(Left, Top, Right, Bottom)
»­Ò»ÌõÖ±Ïß
Canvas.Ellipse(Left, Top, Right, Bottom)
»­³öÒ»¸öÍÖÔ²
Canvas.Circle(X, Y, Radius)
»­³öÒ»¸öÔ²
Canvas.Bar(Left, Top, Right, Bottom)
»­³öÒ»¸ö³¤·½ÐΣ¬ÉÏÃæÓдúÂë½éÉÜÁË
Canvas.Font.ShadowColor
ÎÄ×ÖÒõÓ°ÑÕÉ«
Canvas.Font.ShadowXOffset As Long
ÒõÓ°X×ø±êÉ趨
Canvas.Font.ShadowYOffset As Long
Y×ø±êÉ趨
Canvas.Font.BkMode As String
ÎÄ×Ö±³¾°




ÉÏһƪ£ºÐéÄâÖ÷»ú³öÏÖ500´íÎóÌáʾÈçºÎ½â¾ö£¿
ÏÂһƪ£ºÍøÕ¾·ÃÎÊËÙ¶ÈûÓÐÒÔÇ°¿ì£¬Ê²Ã´Ô­Òò£¿

ÆìÏÂÍøÕ¾£ºÄÍ˼ÖÇ»Û - ÌÔÓòÍø - ÎÒµÄ400µç»° - ÖÐÎÄÓòÃû£ºÄÍ˼Äá¿Ë.cn ÄÍ˼Äá¿Ë.top

ÄÍ˼ÖÇ»Û © °æȨËùÓÐ Copyright © 2000-2024 IISP.COM,Inc. All rights reserved

±¸°¸ºÅÂ룺 ÔÁICP±¸09063828ºÅ¡¡ ¹«°²±¸°¸ºÅ£º ¹«°²±¸°¸ ÔÁ¹«Íø°²±¸ 44049002000123ºÅ¡¡ ÓòÃû×¢²á·þÎñ»ú¹¹Ðí¿É£ºÔÁD3.1-20240003 CNÓòÃû´úÀí×ÔÉîÛÚÍòάÍø

ÉùÃ÷£º±¾ÍøÕ¾ÖÐËùʹÓõ½µÄÆäËû¸÷ÖÖ°æȨÄÚÈÝ£¬°üÀ¨µ«²»ÏÞÓÚÎÄÕ¡¢Í¼Æ¬¡¢ÊÓƵ¡¢ÒôƵ¡¢×ÖÌåµÈÄÚÈÝ°æȨ¹éÔ­×÷ÕßËùÓУ¬ÈçȨÀûËùÓÐÈË·¢ÏÖ£¬Ç뼰ʱ¸æÖª£¬ÒÔ±ãÎÒÃÇɾ³ý°æȨÄÚÈÝ

±¾Õ¾³ÌÐò½çÃæ¡¢Ô´´úÂëÊÜÏà¹Ø·¨Âɱ£»¤, δ¾­ÊÚȨ, ÑϽûʹÓÃ; ÄÍ˼ÖÇ»Û © ΪÎÒ¹«Ë¾×¢²áÉ̱ê, δ¾­ÊÚȨ, ÑϽûʹÓÃ

·¨ÂɹËÎÊ£ºÖ麣֪ÃûÂÉʦ ¹ã¶«óÆÐÐÂÉʦÊÂÎñËù ÏÄÌì·ç ÂÉʦ