婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > ASPJPEG綜合操作的CLASS類

ASPJPEG綜合操作的CLASS類

熱門標簽:綿陽防封電銷卡價格 電銷機器人源碼網盤下載 宜賓語音外呼系統軟件 伊春外呼業務系統 電銷機器人教育 調度系統外呼 福建外呼增值業務線路 河北智能外呼系統軟件 中國辦理電信400電話

'ASPJPEG綜合操作CLASS 
Class AspJpeg 
Dim AspJpeg_Obj,obj 
Private Img_MathPath_From,Img_MathPath_To,Img_Reduce_Size,CoverIf 
Private Img_Frame_Size,Img_Frame_Color,Img_Frame_Solid,Img_Frame_Width,Img_Frame_Height 
Private Img_Font_Content,Img_Font_Family,Img_Font_Color,Img_Font_Quality,Img_Font_Size,Img_Font_Bold,Img_Font_X,Img_Font_Y 
Private Img_PicIn_Path,Img_PicIn_X,Img_PicIn_Y 
'--------------取原文件路徑 
Public Property Let MathPathFrom(StrType) 
Img_MathPath_From=StrType 
End Property 

'--------------取文件保存路徑 
Public Property Let MathPathTo(strType) 
Img_MathPath_To=strType 
End Property 

'--------------保存文件時是否覆蓋已有文件 
Public Property Let CovePro(LngSize) 
If LngSize=0 or LngSize=1 or LngSize=true or LngSize=false then 
CoverIf=LngSize 
End If 
End Property 

'---------------取縮略圖/放大圖 縮略值 
Public Property Let ReduceSize(LngSize) 
If isNumeric(LngSize) then 
Img_Reduce_Size=LngSize 
End If 
End Property 

'---------------取描邊屬性 
'邊框粗細 
Public Property Let FrameSize(LngSize) 
If isNumeric(LngSize) then 
Img_Frame_Size=Clng(LngSize) 
End If 
End Property 
'邊框寬度 
Public Property Let FrameWidth(LngSize) 
If isNumeric(LngSize) then 
Img_Frame_Width=Clng(LngSize) 
End If 
End Property 
'邊框高度 
Public Property Let FrameHeight(LngSize) 
If isNumeric(LngSize) then 
Img_Frame_Height=Clng(LngSize) 
End If 
End Property 
'邊框顏色 
Public Property Let FrameColor(strType) 
If strType>"" then 
Img_Frame_Color=strType 
End If 
End Property 
'邊框是否加粗 
Public Property Let FrameSolid(LngSize) 
If LngSize=1 or LngSize=0 or LngSize=true or LngSize=false then 
Img_Frame_Solid=LngSize 
End If 
End Property 

'---------------取插入文字屬性 
'插入的文字 
Public Property Let Content(strType) 
If strType>"" then 
Img_Font_Content=strType 
End If 
End Property 
'文字字體 
Public Property Let FontFamily(strType) 
If strType>"" then 
Img_Font_Family=strType 
End If 
End Property 
'文字顏色 
Public Property Let FontColor(strType) 
If strType>"" then 
Img_Font_Color=strType 
End If 
End Property 
'文字品質 
Public Property Let FontQuality(LngSize) 
If isNumeric(LngSize) then 
Img_Font_Quality=Clng(LngSize) 
End If 
End Property 
'文字大小 
Public Property Let FontSize(LngSize) 
If isNumeric(LngSize) then 
Img_Font_Size=Clng(LngSize) 
End If 
End Property 
'文字是否加粗 
Public Property Let FontBold(LngSize) 
If LngSize=1 or LngSize=0 or LngSize=true or LngSize=false then 
Img_Font_Bold=LngSize 
End If 
End Property 
'輸入文字的X坐標 
Public Property Let FontX(LngSize) 
If isNumeric(LngSize) then 
Img_Font_X=Clng(LngSize) 
End If 
End Property 
'輸入文字的Y坐標 
Public Property Let FontY(LngSize) 
If isNumeric(LngSize) then 
Img_Font_Y=Clng(LngSize) 
End If 
End Property 

'---------------取插入圖片屬性 
'插入圖片的路徑 
Public Property Let PicInPath(strType) 
Img_PicIn_Path=strType 
End Property 
'圖片插入的X坐標 
Public Property Let PicInX(LngSize) 
If isNumeric(LngSize) then 
Img_PicIn_X=Clng(LngSize) 
End If 
End Property 
'圖片插入的Y坐標 
Public Property Let PicInY(LngSize) 
If isNumeric(LngSize) then 
Img_PicIn_Y=Clng(LngSize) 
End If 
End Property 


Private Sub Class_Initialize() 
Set AspJpeg_Obj=createObject("Persits.Jpeg") 
Img_MathPath_From="" 
Img_MathPath_To="" 
Img_Reduce_Size=150 
Img_Frame_Size=1 
'Img_Frame_Width=0 
'Img_Frame_Height=0 
'Img_Frame_Color="H000000" 
'Img_Frame_Bold=false 
Img_Font_Content="GoldenLeaf" 
'Img_Font_Family="Arial" 
'Img_Font_Color="H000000" 
Img_Font_Quality=3 
Img_Font_Size=14 
'Img_Font_Bold=False 
Img_Font_X=10 
Img_Font_Y=5 
'Img_PicIn_X=0 
'Img_PicIn_Y=0 
CoverIf=1 

End Sub 
Private Sub Class_Terminate() 
Err.Clear 
Set AspJpeg_Obj=Nothing 
End Sub 
'判斷文件是否存在 
Private Function FileIs(path) 
Set fsos=Server.createObject("Scripting.FileSystemObject") 
FileIs=fsos.FileExists(path) 
Set fsos=Nothing 
End Function 

'判斷目錄是否存在 
Private Function FolderIs(path) 
Set fsos=Server.createObject("Scripting.FileSystemObject") 
FolderIs=fsos.FolderExists(path) 
Set fsos=Nothing 
End Function 
'******************************************* 
'函數作用:取得當前文件的上一級路徑 
'******************************************* 
Private Function UpDir(ByVal D) 
If Len(D) = 0 then 
UpDir="" 
Else 
UpDir=Left(D,InStrRev(D,"\")-1) 
End If 
End Function 

Private Function Errors(Errors_id) 
select Case Errors_id 
Case "0" 
Errors="指定文件不存在" 
Case 1 
Errors="指定目錄不存在" 
Case 2 
Errors="已存在相同名稱文件" 
Case 3 
Errors="參數溢出" 
End select 
End Function 


'取圖片寬度 
Public Function ImgInfo_Width(Img_MathPath) 
If Not(FileIs(Img_MathPath)) then 
'Exit Function 
ImgInfo_Width=Errors(0) 
Else 
AspJpeg_Obj.Open Img_MathPath 
ImgInfo_Width=AspJpeg_Obj.width 
End If 
End Function 
'取圖片高度 
Public Function ImgInfo_Height(Img_MathPath) 
If Not(FileIs(Img_MathPath)) then 
'Exit Function 
ImgInfo_Height=Errors(0) 
Else 
AspJpeg_Obj.Open Img_MathPath 
ImgInfo_Height=AspJpeg_Obj.height 
End If 
End Function 
'生成縮略圖/放大圖 
Public Function Img_Reduce() 
If Not(FileIs(Img_MathPath_From)) then 
Img_Reduce=Errors(0) 
Exit Function 
End If 
If Not(FolderIs(UpDir(Img_MathPath_To))) then 
Img_Reduce=Errors(1) 
Exit Function 
End If 
If CoverIf=0 or CoverIf=False then 
If FileIs(Img_MathPath_To) then 
Img_Reduce=Errors(2) 
Exit Function 
End If 
End If 
AspJpeg_Obj.Open Img_MathPath_From 
AspJpeg_Obj.PreserveAspectRatio = True 
If AspJpeg_Obj.OriginalWidth>AspJpeg_Obj.OriginalHeight Then 
AspJpeg_Obj.Width=Img_Reduce_Size 
Else 
AspJpeg_Obj.Height=Img_Reduce_Size 
End If 
If AspJpeg_Obj.OriginalWidth>Img_Reduce_Size or AspJpeg_Obj.OriginalHeight>Img_Reduce_Size Then 
If AspJpeg_Obj.WidthImg_Reduce_Size or AspJpeg_Obj.HeightImg_Reduce_Size then 
Set AspJpeg_Obj_New=createObject("Persits.Jpeg") 
AspJpeg_Obj_New.new Img_Reduce_Size,Img_Reduce_Size,HFFFFFF 
AspJpeg_Obj_New.DrawImage (150-AspJpeg_Obj.width)/2,(150-AspJpeg_Obj.height)/2,AspJpeg_Obj 
If Img_Frame_Size>0 then 
Call Img_Pen(AspJpeg_Obj_New) 
End If 
If Img_Font_Content>"" then 
Img_Font_X=AspJpeg_Obj_New.Width/2 
Img_Font_Y=AspJpeg_Obj_New.Height-15 
Call Img_Font(AspJpeg_Obj_New) 
End If 
AspJpeg_Obj_New.Sharpen 1, 130 
AspJpeg_Obj_New.Save Img_MathPath_To 
Set AspJpeg_Obj_New=Nothing 
Else 
If Img_Frame_Size>0 then 
Call Img_Pen(AspJpeg_Obj) 
End If 
If Img_Font_Content>"" then 
Img_Font_X=AspJpeg_Obj.Width/2 
Img_Font_Y=AspJpeg_Obj.Height-15 
Call Img_Font(AspJpeg_Obj) 
End If 
AspJpeg_Obj.Sharpen 1, 130 
AspJpeg_Obj.Save Img_MathPath_To 
End If 
Else 
If Img_Frame_Size>0 then 
Call Img_Pen(AspJpeg_Obj) 
End If 
If Img_Font_Content>"" then 
Img_Font_X=AspJpeg_Obj.Width/2 
Img_Font_Y=AspJpeg_Obj.Height-15 
Call Img_Font(AspJpeg_Obj) 
End If 
AspJpeg_Obj.Sharpen 1, 130 
AspJpeg_Obj.Save Img_MathPath_To 
End If 
End Function 
'生成水印 
Public Function Img_WaterMark() 
If Not(FileIs(Img_MathPath_From)) then 
Img_WaterMark=Errors(0) 
Exit Function 
End If 
If Img_MathPath_To="" then 
Img_MathPath_To=Img_MathPath_From 
ElseIf Not(FolderIs(UpDir(Img_MathPath_To))) then 
Img_WaterMark=Errors(1) 
Exit Function 
End If 
If CoverIf=0 or CoverIf=false then 
If Img_MathPath_To>Img_MathPath_From and FileIs(Img_MathPath_To) then 
Img_WaterMark=Errors(2) 
Exit Function 
End If 
End If 
AspJpeg_Obj.Open Img_MathPath_From 
If Img_PicIn_Path>"" then 
If Not(FileIs(Img_PicIn_Path)) then 
Img_WaterMark=Errors(0) 
Exit Function 
End If 
Set AspJpeg_Obj_New=createObject("Persits.Jpeg") 
AspJpeg_Obj_New.Open Img_PicIn_Path 
AspJpeg_Obj.PreserveAspectRatio = True 
AspJpeg_Obj_New.PreserveAspectRatio = True 
If AspJpeg_Obj.OriginalWidthImg_Reduce_Size or AspJpeg_Obj.OriginalHeightImg_Reduce_Size then 
Img_WaterMark=Errors(3) 
Exit Function 
End If 
If AspJpeg_Obj_New.OriginalWidth>AspJpeg_Obj_New.OriginalHeight Then 
AspJpeg_Obj_New.Width=Img_Reduce_Size 
Else 
AspJpeg_Obj_New.Height=Img_Reduce_Size 
End If 
If Img_PicIn_X="" then Img_PicIn_X=AspJpeg_Obj.Width-AspJpeg_Obj_New.Width 
If Img_PicIn_Y="" then Img_PicIn_Y=AspJpeg_Obj.Height-AspJpeg_Obj_New.Height 
AspJpeg_Obj.DrawImage Img_PicIn_X,Img_PicIn_Y,AspJpeg_Obj_New 
Set AspJpeg_Obj_New=Nothing 
End If 
If Img_Frame_Size>0 then 
Call Img_Pen(AspJpeg_Obj) 
End If 
If Img_Font_Content>"" then 
Call Img_Font(AspJpeg_Obj) 
End If 
'AspJpeg_Obj.Sharpen 1, 130 
AspJpeg_Obj.Save Img_MathPath_To 
End Function 
'生成框架 
Private Function Img_Pen(Obj) 
If Img_Frame_Width=0 then Img_Frame_Width=Obj.Width 
If Img_Frame_Height=0 then Img_Frame_Height=Obj.Height 
Obj.Canvas.Pen.Color = Img_Frame_Color 
Obj.Canvas.Pen.Width = Img_Frame_Size 
Obj.Canvas.Brush.Solid = Img_Frame_Solid 
Obj.Canvas.Bar 1,1,Img_Frame_Width,Img_Frame_Height 
End Function 
'生成水印字 
Private Function Img_Font(Obj) 
Obj.Canvas.Font.Color = Img_Font_Color 
Obj.Canvas.Font.Family = Img_Font_Family 
Obj.Canvas.Font.Quality=Img_Font_Quality 
Obj.Canvas.Font.Size=Img_Font_Size 
Obj.Canvas.Font.Bold = Img_Font_Bold 
Obj.Canvas.Print Img_Font_X,Img_Font_Y,Img_Font_Content 
End Function 
End Class 
%> 
這個類可以公開調用 
1. ImgInfo_Height 取圖片高度 
2. ImgInfo_Width 取圖片寬度 
調用方法: 
復制代碼 代碼如下:

Dim NewObj,Pic_h,Pic_w  
Set NewObj=New AspJpeg  
Pic_h=NewObj.ImgInfo_Height("f:/test.jpg")  
Pic_w=NewObj.ImgInfo_Width("f:/test.jpg")  
Set NewObj=Nothing  
Response.Write "This Picture's Height is "Pic_h  
Response.Write "This Picture's Width is "Pic_w  
Response.End  

3. Img_Reduce 對指定圖片縮小或放大并保存(可選擇是否加水印,是否加框架) 
必須定義聲明 MathPathFrom,MathPathTo 
默認為縮放至150X150 圖案 如按比例縮放后圖案小于該尺寸,則補充空白圖片 
默認文件自動覆蓋 
實例: 
復制代碼 代碼如下:

Dim NewObj,NewCommand  
Set NewObj=New AspJpeg  
NewObj.MathPathFrom="f:/test.jpg"  
NewObj.MathPathTo="f:/reduce.jpg"  
NewCommand=NewObj.Img_Reduce  
Set NewObj=Nothing  
If NewCommand>"" then  
Response.Write "Success"  
Else  
'圖片操作過程中出現錯誤  
Response.Write "Failed"  
End If  

4. Img_WaterMark 給指定圖片添加水印 
水印可以為圖片 文字 或 2者結合 
您可能感興趣的文章:
  • ASP中類Class相關內容的整理資料
  • ASP類Class入門 推薦
  • ASP 類 Class入門
  • 一個ASP創建動態對象的工廠類(類似PHP的stdClass)
  • CJJ專用ASP類庫中的某個class

標簽:蘇州 電商邀評 新鄉 延邊 優質小號 那曲 銅川 河池

巨人網絡通訊聲明:本文標題《ASPJPEG綜合操作的CLASS類》,本文關鍵詞  ASPJPEG,綜合,操作,的,CLASS,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《ASPJPEG綜合操作的CLASS類》相關的同類信息!
  • 本頁收集關于ASPJPEG綜合操作的CLASS類的相關信息資訊供網民參考!
  • 推薦文章
    婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av
    日韩天堂在线观看| 91免费看片在线观看| 欧美岛国在线观看| 欧美日韩精品免费观看视频| 成人精品国产一区二区4080| 日韩国产一二三区| 午夜精品成人在线视频| 亚洲一卡二卡三卡四卡无卡久久| 国产网站一区二区| 久久久一区二区三区| 日韩精品一区二区三区四区视频| 欧美日本国产一区| 欧美日韩激情一区| 欧美色区777第一页| 在线一区二区三区四区| 色先锋aa成人| 精品视频一区二区三区免费| 欧美色大人视频| 欧美日韩精品一区二区在线播放| 色综合久久综合网欧美综合网| www..com久久爱| 91视频.com| 欧美三级电影网| 51精品秘密在线观看| 在线综合视频播放| 91精品国产免费久久综合| 91精品国产综合久久久久久漫画| 制服丝袜国产精品| 久久综合一区二区| 亚洲视频中文字幕| 精品奇米国产一区二区三区| 欧美色中文字幕| 制服丝袜国产精品| 久久奇米777| 国产精品久久久99| 亚洲123区在线观看| 久久精品国产一区二区三| 国精产品一区一区三区mba桃花| 国产一区二区三区电影在线观看| yourporn久久国产精品| 欧美日韩一本到| 精品第一国产综合精品aⅴ| 欧美国产乱子伦| 亚洲自拍另类综合| 国产一区二区三区久久久| 不卡欧美aaaaa| 91精品国产综合久久婷婷香蕉| 国产日韩欧美亚洲| 亚洲国产精品尤物yw在线观看| 激情图片小说一区| 93久久精品日日躁夜夜躁欧美| 欧美午夜影院一区| 久久综合九色综合97_久久久 | 日本韩国一区二区三区| 欧美麻豆精品久久久久久| 久久夜色精品国产噜噜av| 成人欧美一区二区三区视频网页| 亚洲一二三专区| 国产成人啪午夜精品网站男同| 欧美中文字幕久久| 欧美激情一区三区| 日本不卡视频在线观看| 91欧美激情一区二区三区成人| 91麻豆精品国产91久久久使用方法| 久久综合九色综合97婷婷女人| 一区二区三区在线高清| 国产精品12区| 欧美大度的电影原声| 亚洲精品免费视频| 丰满亚洲少妇av| 欧美一级黄色录像| 亚洲影视在线播放| 99精品国产91久久久久久| 精品国产乱码久久久久久夜甘婷婷| 自拍偷拍国产亚洲| 国产成人综合自拍| 555夜色666亚洲国产免| 亚洲免费色视频| 成人黄色大片在线观看| 精品久久久久香蕉网| 日本视频在线一区| 欧美天天综合网| 亚洲人123区| 成人av在线电影| 久久久精品综合| 国产一区日韩二区欧美三区| 日韩欧美高清在线| 久久福利视频一区二区| 精品视频1区2区| 一区二区三区欧美激情| 色网综合在线观看| 一区二区三区蜜桃| 91天堂素人约啪| 中文字幕一区不卡| 99久久精品情趣| 亚洲乱码中文字幕| 欧美丝袜丝nylons| 日本不卡中文字幕| 欧美成人官网二区| 国产剧情av麻豆香蕉精品| 久久久久国产成人精品亚洲午夜| 国产成人精品免费| 亚洲人xxxx| 91麻豆精品国产91久久久| 久久精品国产成人一区二区三区| 欧美不卡在线视频| 粉嫩蜜臀av国产精品网站| 亚洲人成影院在线观看| 欧美无砖砖区免费| 青娱乐精品在线视频| 久久―日本道色综合久久| 国产精品综合一区二区三区| 国产精品嫩草久久久久| 91精品办公室少妇高潮对白| 亚洲成a人片在线不卡一二三区| 欧美一级久久久| 成人中文字幕在线| 亚洲国产精品久久艾草纯爱| 欧美色男人天堂| 国产精品自在在线| 依依成人精品视频| 精品精品欲导航| 成人免费毛片aaaaa**| 亚洲一区在线观看免费观看电影高清 | 亚洲欧洲另类国产综合| 欧美综合一区二区三区| 蜜臂av日日欢夜夜爽一区| 国产日韩精品视频一区| 在线精品视频小说1| 老司机精品视频线观看86 | 日韩黄色小视频| 国产日本欧美一区二区| 在线一区二区视频| 国产乱码精品一品二品| 有码一区二区三区| 国产午夜久久久久| 欧美精品xxxxbbbb| 99热99精品| 老司机精品视频一区二区三区| 1000部国产精品成人观看| 欧美电视剧免费观看| 在线视频你懂得一区二区三区| 国产美女视频91| 三级亚洲高清视频| 亚洲视频免费观看| 2023国产一二三区日本精品2022| 91国偷自产一区二区三区成为亚洲经典| 美腿丝袜亚洲一区| 亚洲国产精品综合小说图片区| 国产精品久久看| 精品国产乱码久久久久久老虎| 欧美日韩精品一区二区在线播放| 成年人国产精品| 激情小说欧美图片| 精品亚洲成a人在线观看| 日韩av一区二| 天堂av在线一区| 亚洲综合另类小说| 亚洲欧美日韩国产中文在线| 久久免费美女视频| 久久亚洲综合色一区二区三区| 在线播放中文字幕一区| 日本韩国欧美在线| 91在线云播放| 91视视频在线观看入口直接观看www| 国产精品一线二线三线| 国产综合成人久久大片91| 久久99国产精品麻豆| 免费人成在线不卡| 麻豆精品蜜桃视频网站| 免费在线观看一区| 免费av网站大全久久| 欧美一区二区三区视频在线观看| 亚洲精品视频在线观看免费| 国产精品乱子久久久久| 国产欧美一区二区精品性| 久久免费精品国产久精品久久久久| 欧美电影免费观看高清完整版| 4438成人网| 日韩女优视频免费观看| 欧美精品一区二区三区四区 | 国产欧美视频一区二区三区| 精品日韩99亚洲| 久久久久久久久久久久久女国产乱 | 亚洲精品日韩一| 一区二区三区在线视频观看58| 亚洲在线视频一区| 日韩精品视频网站| 国产一区二区三区免费观看| 国产sm精品调教视频网站| 成人免费视频一区二区| 在线中文字幕一区二区| 欧美一区二区视频在线观看2022| 5566中文字幕一区二区电影| 日韩三级免费观看| 欧美激情中文不卡| 亚洲国产成人av好男人在线观看| 天天色天天爱天天射综合| 久久国产欧美日韩精品| 丁香婷婷综合色啪|