11 个解决方案
#1
高手
#2
需要组件来实现的!!
aspupload
www.aspupload.com
aspupload
www.aspupload.com
#3
关注
#4
如果逻辑缩小,只需要限制图片尺寸就可以。
如果物理缩小,则需要组件,图片的大小也要缩小。
该名字是很容易
如果物理缩小,则需要组件,图片的大小也要缩小。
该名字是很容易
#5
//-----------resize.asp------------------
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="resize_upload.asp">
Select a JPEG image:<BR>
<INPUT TYPE="FILE" SIZE="40" NAME="FILE1"><BR>
Scale: <SELECT NAME="Scale">
<OPTION VALUE="80">80%</OPTION>
<OPTION VALUE="50">50%</OPTION>
<OPTION VALUE="25">25%</OPTION>
<OPTION VALUE="10">10%</OPTION>
</SELECT><P>
<INPUT TYPE=SUBMIT VALUE="Upload!">
</FORM>
//----------------------resize_upload.asp---------------
<%
Set Upload = Server.CreateObject("Persits.Upload")
' Use AspJpeg to resize image
Set Jpeg = Server.CreateObject("Persits.Jpeg")
' Capture and save uploaded image to the same directory as script
Upload.Save Server.MapPath(".")
For Each File in Upload.Files
If File.ImageType <> "JPG" Then
Response.Write "This is now a JPGE image."
File.Delete
Response.End
End If
Jpeg.Open File.Path
Scale = Upload.Form("Scale")
Jpeg.Width = Jpeg.OriginalWidth * Scale / 100
Jpeg.Height = Jpeg.OriginalHeight * Scale / 100
Response.Write Jpeg.OriginalHeight & "-" & Jpeg.Height
Jpeg.Save Server.MapPath(".") & "\small_" & File.FileName
%>
<IMG SRC="<% = File.FileName %>"><BR>
<IMG SRC="<% = "small_" & File.FileName %>"><P>
<%
Next
%>
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="resize_upload.asp">
Select a JPEG image:<BR>
<INPUT TYPE="FILE" SIZE="40" NAME="FILE1"><BR>
Scale: <SELECT NAME="Scale">
<OPTION VALUE="80">80%</OPTION>
<OPTION VALUE="50">50%</OPTION>
<OPTION VALUE="25">25%</OPTION>
<OPTION VALUE="10">10%</OPTION>
</SELECT><P>
<INPUT TYPE=SUBMIT VALUE="Upload!">
</FORM>
//----------------------resize_upload.asp---------------
<%
Set Upload = Server.CreateObject("Persits.Upload")
' Use AspJpeg to resize image
Set Jpeg = Server.CreateObject("Persits.Jpeg")
' Capture and save uploaded image to the same directory as script
Upload.Save Server.MapPath(".")
For Each File in Upload.Files
If File.ImageType <> "JPG" Then
Response.Write "This is now a JPGE image."
File.Delete
Response.End
End If
Jpeg.Open File.Path
Scale = Upload.Form("Scale")
Jpeg.Width = Jpeg.OriginalWidth * Scale / 100
Jpeg.Height = Jpeg.OriginalHeight * Scale / 100
Response.Write Jpeg.OriginalHeight & "-" & Jpeg.Height
Jpeg.Save Server.MapPath(".") & "\small_" & File.FileName
%>
<IMG SRC="<% = File.FileName %>"><BR>
<IMG SRC="<% = "small_" & File.FileName %>"><P>
<%
Next
%>
#6
//-----------resize.asp------------------
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="resize_upload.asp">
Select a JPEG image:<BR>
<INPUT TYPE="FILE" SIZE="40" NAME="FILE1"><BR>
Scale: <SELECT NAME="Scale">
<OPTION VALUE="80">80%</OPTION>
<OPTION VALUE="50">50%</OPTION>
<OPTION VALUE="25">25%</OPTION>
<OPTION VALUE="10">10%</OPTION>
</SELECT><P>
<INPUT TYPE=SUBMIT VALUE="Upload!">
</FORM>
//----------------------resize_upload.asp---------------
<%
Set Upload = Server.CreateObject("Persits.Upload")
' Use AspJpeg to resize image
Set Jpeg = Server.CreateObject("Persits.Jpeg")
' Capture and save uploaded image to the same directory as script
Upload.Save Server.MapPath(".")
For Each File in Upload.Files
If File.ImageType <> "JPG" Then
Response.Write "This is now a JPGE image."
File.Delete
Response.End
End If
Jpeg.Open File.Path
Scale = Upload.Form("Scale")
Jpeg.Width = Jpeg.OriginalWidth * Scale / 100
Jpeg.Height = Jpeg.OriginalHeight * Scale / 100
Response.Write Jpeg.OriginalHeight & "-" & Jpeg.Height
Jpeg.Save Server.MapPath(".") & "\small_" & File.FileName
%>
<IMG SRC="<% = File.FileName %>"><BR>
<IMG SRC="<% = "small_" & File.FileName %>"><P>
<%
Next
%>
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="resize_upload.asp">
Select a JPEG image:<BR>
<INPUT TYPE="FILE" SIZE="40" NAME="FILE1"><BR>
Scale: <SELECT NAME="Scale">
<OPTION VALUE="80">80%</OPTION>
<OPTION VALUE="50">50%</OPTION>
<OPTION VALUE="25">25%</OPTION>
<OPTION VALUE="10">10%</OPTION>
</SELECT><P>
<INPUT TYPE=SUBMIT VALUE="Upload!">
</FORM>
//----------------------resize_upload.asp---------------
<%
Set Upload = Server.CreateObject("Persits.Upload")
' Use AspJpeg to resize image
Set Jpeg = Server.CreateObject("Persits.Jpeg")
' Capture and save uploaded image to the same directory as script
Upload.Save Server.MapPath(".")
For Each File in Upload.Files
If File.ImageType <> "JPG" Then
Response.Write "This is now a JPGE image."
File.Delete
Response.End
End If
Jpeg.Open File.Path
Scale = Upload.Form("Scale")
Jpeg.Width = Jpeg.OriginalWidth * Scale / 100
Jpeg.Height = Jpeg.OriginalHeight * Scale / 100
Response.Write Jpeg.OriginalHeight & "-" & Jpeg.Height
Jpeg.Save Server.MapPath(".") & "\small_" & File.FileName
%>
<IMG SRC="<% = File.FileName %>"><BR>
<IMG SRC="<% = "small_" & File.FileName %>"><P>
<%
Next
%>
#7
FSO,ASPupload都可以重命名
#8
谢谢!
我正在调试。
我正在调试。
#9
xxu333(小笑) 和 kalen808(cn Bill Gages) 提供的方法是需要组件的吗?组件在哪里下载?
#10
组件都是要注册的,注册码哪里有?
#11
图像的缩小图
用vc写一个组件 很简单的
用vc写一个组件 很简单的
#1
高手
#2
需要组件来实现的!!
aspupload
www.aspupload.com
aspupload
www.aspupload.com
#3
关注
#4
如果逻辑缩小,只需要限制图片尺寸就可以。
如果物理缩小,则需要组件,图片的大小也要缩小。
该名字是很容易
如果物理缩小,则需要组件,图片的大小也要缩小。
该名字是很容易
#5
//-----------resize.asp------------------
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="resize_upload.asp">
Select a JPEG image:<BR>
<INPUT TYPE="FILE" SIZE="40" NAME="FILE1"><BR>
Scale: <SELECT NAME="Scale">
<OPTION VALUE="80">80%</OPTION>
<OPTION VALUE="50">50%</OPTION>
<OPTION VALUE="25">25%</OPTION>
<OPTION VALUE="10">10%</OPTION>
</SELECT><P>
<INPUT TYPE=SUBMIT VALUE="Upload!">
</FORM>
//----------------------resize_upload.asp---------------
<%
Set Upload = Server.CreateObject("Persits.Upload")
' Use AspJpeg to resize image
Set Jpeg = Server.CreateObject("Persits.Jpeg")
' Capture and save uploaded image to the same directory as script
Upload.Save Server.MapPath(".")
For Each File in Upload.Files
If File.ImageType <> "JPG" Then
Response.Write "This is now a JPGE image."
File.Delete
Response.End
End If
Jpeg.Open File.Path
Scale = Upload.Form("Scale")
Jpeg.Width = Jpeg.OriginalWidth * Scale / 100
Jpeg.Height = Jpeg.OriginalHeight * Scale / 100
Response.Write Jpeg.OriginalHeight & "-" & Jpeg.Height
Jpeg.Save Server.MapPath(".") & "\small_" & File.FileName
%>
<IMG SRC="<% = File.FileName %>"><BR>
<IMG SRC="<% = "small_" & File.FileName %>"><P>
<%
Next
%>
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="resize_upload.asp">
Select a JPEG image:<BR>
<INPUT TYPE="FILE" SIZE="40" NAME="FILE1"><BR>
Scale: <SELECT NAME="Scale">
<OPTION VALUE="80">80%</OPTION>
<OPTION VALUE="50">50%</OPTION>
<OPTION VALUE="25">25%</OPTION>
<OPTION VALUE="10">10%</OPTION>
</SELECT><P>
<INPUT TYPE=SUBMIT VALUE="Upload!">
</FORM>
//----------------------resize_upload.asp---------------
<%
Set Upload = Server.CreateObject("Persits.Upload")
' Use AspJpeg to resize image
Set Jpeg = Server.CreateObject("Persits.Jpeg")
' Capture and save uploaded image to the same directory as script
Upload.Save Server.MapPath(".")
For Each File in Upload.Files
If File.ImageType <> "JPG" Then
Response.Write "This is now a JPGE image."
File.Delete
Response.End
End If
Jpeg.Open File.Path
Scale = Upload.Form("Scale")
Jpeg.Width = Jpeg.OriginalWidth * Scale / 100
Jpeg.Height = Jpeg.OriginalHeight * Scale / 100
Response.Write Jpeg.OriginalHeight & "-" & Jpeg.Height
Jpeg.Save Server.MapPath(".") & "\small_" & File.FileName
%>
<IMG SRC="<% = File.FileName %>"><BR>
<IMG SRC="<% = "small_" & File.FileName %>"><P>
<%
Next
%>
#6
//-----------resize.asp------------------
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="resize_upload.asp">
Select a JPEG image:<BR>
<INPUT TYPE="FILE" SIZE="40" NAME="FILE1"><BR>
Scale: <SELECT NAME="Scale">
<OPTION VALUE="80">80%</OPTION>
<OPTION VALUE="50">50%</OPTION>
<OPTION VALUE="25">25%</OPTION>
<OPTION VALUE="10">10%</OPTION>
</SELECT><P>
<INPUT TYPE=SUBMIT VALUE="Upload!">
</FORM>
//----------------------resize_upload.asp---------------
<%
Set Upload = Server.CreateObject("Persits.Upload")
' Use AspJpeg to resize image
Set Jpeg = Server.CreateObject("Persits.Jpeg")
' Capture and save uploaded image to the same directory as script
Upload.Save Server.MapPath(".")
For Each File in Upload.Files
If File.ImageType <> "JPG" Then
Response.Write "This is now a JPGE image."
File.Delete
Response.End
End If
Jpeg.Open File.Path
Scale = Upload.Form("Scale")
Jpeg.Width = Jpeg.OriginalWidth * Scale / 100
Jpeg.Height = Jpeg.OriginalHeight * Scale / 100
Response.Write Jpeg.OriginalHeight & "-" & Jpeg.Height
Jpeg.Save Server.MapPath(".") & "\small_" & File.FileName
%>
<IMG SRC="<% = File.FileName %>"><BR>
<IMG SRC="<% = "small_" & File.FileName %>"><P>
<%
Next
%>
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="resize_upload.asp">
Select a JPEG image:<BR>
<INPUT TYPE="FILE" SIZE="40" NAME="FILE1"><BR>
Scale: <SELECT NAME="Scale">
<OPTION VALUE="80">80%</OPTION>
<OPTION VALUE="50">50%</OPTION>
<OPTION VALUE="25">25%</OPTION>
<OPTION VALUE="10">10%</OPTION>
</SELECT><P>
<INPUT TYPE=SUBMIT VALUE="Upload!">
</FORM>
//----------------------resize_upload.asp---------------
<%
Set Upload = Server.CreateObject("Persits.Upload")
' Use AspJpeg to resize image
Set Jpeg = Server.CreateObject("Persits.Jpeg")
' Capture and save uploaded image to the same directory as script
Upload.Save Server.MapPath(".")
For Each File in Upload.Files
If File.ImageType <> "JPG" Then
Response.Write "This is now a JPGE image."
File.Delete
Response.End
End If
Jpeg.Open File.Path
Scale = Upload.Form("Scale")
Jpeg.Width = Jpeg.OriginalWidth * Scale / 100
Jpeg.Height = Jpeg.OriginalHeight * Scale / 100
Response.Write Jpeg.OriginalHeight & "-" & Jpeg.Height
Jpeg.Save Server.MapPath(".") & "\small_" & File.FileName
%>
<IMG SRC="<% = File.FileName %>"><BR>
<IMG SRC="<% = "small_" & File.FileName %>"><P>
<%
Next
%>
#7
FSO,ASPupload都可以重命名
#8
谢谢!
我正在调试。
我正在调试。
#9
xxu333(小笑) 和 kalen808(cn Bill Gages) 提供的方法是需要组件的吗?组件在哪里下载?
#10
组件都是要注册的,注册码哪里有?
#11
图像的缩小图
用vc写一个组件 很简单的
用vc写一个组件 很简单的