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.Width<Img_Reduce_Size or AspJpeg_Obj.Height<Img_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