01.
<%
02.
Option
Explicit
03.
Dim
Chs, objConst,NewWidth,NewHeight
04.
Dim
FileName,OutFormat
05.
FileName =
"mygirl.jpg"
06.
OutFormat =
"Jpg"
07.
NewWidth =
"100"
08.
NewHeight = 0
09.
10.
11.
Dim
objFso,myImg,Width,Height
12.
Set
objFso = CreateObject(
"Scripting.FileSystemObject"
)
13.
IF objFso.FileExists(Server.MapPath(FileName))
Then
14.
set myImg = Loadpicture(Server.MapPath(FileName))
15.
Width = Round(myImg.width / 26.4583)
16.
Height = Round(myImg.height / 26.4583)
17.
NewHeight = Round((NewWidth*Height)/Width)
18.
19.
20.
End
If
21.
22.
23.
Set
Chs = Server.CreateObject(
"OWC10.ChartSpace"
)
24.
Set
objConst = Chs.Constants
25.
26.
Chs.Interior.SetTextured Server.MapPath(FileName), objConst.chStretchPlot, , objConst.chAllFaces
27.
Chs.border.color = -3
28.
29.
Response.BinaryWrite Chs.GetPicture(OutFormat, NewWidth, NewHeight)
30.
31.
Set
objConst =
Nothing
32.
Set
Chs =
Nothing
33.
%>