⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 manual_image.html

📁 aspupload
💻 HTML
字号:
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Developer Studio">
<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="KEYWORDS" content="ASP UPLOAD ASPUPLOAD PWS BLOB Personal Web Server IIS Internet Information Server ASP UPLOADING UPLOAD DEC ALPHA AlphaServer AspUpload Persits Software Persits Web ASP Active Server Pages Active Server Component Upload browser TYPE=FILE TYPE FILE Windows NT Web ACL ACE Access Control List Directory Listing Export Attribute FILE FREE RFC ie3 ie4 posting acceptor posting acceptor RFC1867 RFC-1867 1867 Component ENCTYPE multipart/form-data multipart SA-FileUp ActiveFile Database Multiple software artisans activefile vbscript activex jscript netscape internet explorer download downloading unique form limit size">
<meta name="KEYWORDS" content="ASP, UPLOAD, ASPUPLOAD, PWS, BLOB, Personal Web Server, IIS, Internet Information Server, ASP, UPLOADING, UPLOAD, DEC, ALPHA, AlphaServer, AspUpload, Persits Software, Persits, Web, ASP, Active Server Pages, Active Server Component, Upload, browser, TYPE=FILE, TYPE, FILE, Windows, NT, Web, ACL, ACE, Access Control List, Directory, Listing, Export, Attribute, FILE, FREE, RFC, ie3, ie4, posting acceptor, posting, acceptor, RFC1867, RFC-1867, 1867, Component, ENCTYPE, multipart/form-data, multipart, SA-FileUp, ActiveFile, Database, Multiple, software, artisans, activefile, vbscript, activex, jscript, netscape, internet, explorer, download, downloading, unique, form, limit, size">
<meta name="DESCRIPTION" content="AspUpload.com - the home of the most advanced upload solution for a Windows NT/ASP-based Web environment">
<TITLE>AspUpload.com - User Manual. Chapter 7</TITLE>
</HEAD>
<BODY BACKGROUND="bk.gif" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
<BASEFONT FACE="Helvetica, Arial" SIZE=1>

<!-- Main Data table -->
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="705">
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="160">
<FONT FACE="arial narrow" Size=2>
<B>
	<IMG SRC="spacer.gif" BORDER="0" HEIGHT="15"><BR>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="index.html">Home</A>
	<BR>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="whatsnew.html">What's New</A>
	<P>
	<IMG SRC="sq.gif"><IMG SRC="square_pressed.gif"> <A HREF="manual.html">User Manual</A>
	<BR>

	<IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="square_small.gif"> <A HREF="manual_intro.html">1. Introduction</A><BR>
	<IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="square_small.gif"> <A HREF="manual_simple.html">2. Simple Uploads</A><BR>
	<IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="square_small.gif"> <A HREF="manual_memory.html">3. Memory Uploads</A><BR>
	<IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="square_small.gif"> <A HREF="manual_db.html">4. Database</A><BR>	
	<IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="square_small.gif"> <A HREF="manual_progress.html">5. Progress Bar</A><BR>
	<IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="square_small.gif"> <A HREF="manual_security.html">6. Security</A><BR>
	<IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="square_small_pressed.gif"> 7. Images<BR>
	<IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="square_small.gif"> <A HREF="manual_unicode.html">8. Unicode</A><BR>
	<IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="square_small.gif"> <A HREF="manual_misc.html">9. Miscellaneous</A><BR>
	<IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="square_small.gif"> <A HREF="manual_share.html">10. Hosting Issues</A><BR>

	<P>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="objectreference.html">Object Reference</A>
	<BR>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="livedemo.html">Live Demos</A>
	<BR>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="support.html">Support</A>
	<P>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="xupload.html">XUpload</A><BR>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="jupload.html">JUpload</A><BR>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="aspjpeg.html">AspJpeg</A><BR>
	<P>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="download.html">Download</A>
	<BR>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="purchase.html">Purchase</A>
	<P>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="clients.html">Clients</A>
	<BR>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="otherproducts.html">Other Products</A>
	<BR>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="contact.html">Contact Us</A>


	<FORM TARGET="_new" ACTION="http://support.persits.com/emails/signup.asp">
	<FONT FACE="Arial Narrow" SIZE="2" COLOR="#9C3131"><IMG SRC="sq.gif"><B>Newsletter Signup</B></FONT><BR>
	<IMG SRC="sq.gif"><INPUT TYPE="TEXT" NAME="email" SIZE="15" VALUE="e-mail address"></FORM>
</B>
</FONT>
</TD>
<TD VALIGN=TOP WIDTH=545 ALIGN="LEFT">
<!-- Right Column with data -->
<IMG SRC="sq.gif"><BR>
<IMG SRC="manual.gif">
<BR>
<TABLE WIDTH=540 HEIGHT=2 CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TD BGcolor="#FFCE00"><spacer type=block width=540 height=2></TD>
</TABLE>
<P>	
	<FONT SIZE=2 FACE=ARIAL COLOR="#000000">

	
	<A HREF="manual_unicode.html"><IMG BORDER="0" SRC="next.gif" ALIGN="RIGHT" ALT="Chapter 8: Unicode Support"></A>
	<A HREF="manual_security.html"><IMG BORDER="0" SRC="previous.gif" ALIGN="RIGHT" ALT="Chapter 6: User Impersonation and Permissions"></A>
	
	
	<B><U><FONT SIZE="3" COLOR="#990000">Chapter 7. Image Handling</FONT></U></B>
	<P>
	
	<B><FONT COLOR="#0000A0">Image Size and Type Extraction</FONT></B>
	<BLOCKQUOTE>
	AspUpload is capable of determining the type and pixel size
	of uploaded images. The formats currently supported are GIF, JPEG, BMP and PNG.
	The type and size information is returned via the properties
	<B>File.ImageType</B>, <B>File.ImageWidth</B>, and <B>File.ImageHeight</B>.
	<P>
	The property <B>File.ImageType</B>
	returns the strings <B>"GIF"</B>, <B>"JPG"</B>, <B>"BMP"</B>, <B>"PNG"</B>
	(for GIF JPEG BMP and PNG images, respectively), or <B>"UNKNOWN"</B>
	if the file is not an image or of an unknown image type.
	<P>
	The properties <B>File.ImageWidth</B> and <B>File.ImageHeight</B> 
	return the image width and height in pixels, or 0 
	if the file is not an image.
	<P>
	The code samples <B>size.asp</B> and <B>size_upload.asp</B>
	demonstrate the usage of these properties.
	<P>
	<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=3>
	<TR><TD BGCOLOR="#FFFF00">
	<FONT SIZE="1" FACE="Courier New">
	&lt;!--#include file="AspUpload.inc"--><P>
	&lt;HTML><BR>
	&lt;BODY><BR>

	&lt;%<BR>
	Set Upload = Server.CreateObject("Persits.Upload")<P>

	' Capture and save uploaded image<BR>
	Upload.Save "c:\upload"<P>

	For Each File in Upload.Files<BR>
	&nbsp;&nbsp;&nbsp;If File.ImageType = "UNKNOWN" Then<BR>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Response.Write "This is now an image."<BR>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Response.End<BR>
	&nbsp;&nbsp;&nbsp;End If<P>

	&nbsp;&nbsp;&nbsp;Response.Write File.Path & "&lt;BR>"<BR>
	&nbsp;&nbsp;&nbsp;Response.Write "Type: " & File.ImageType & "&lt;BR>"<BR>
	&nbsp;&nbsp;&nbsp;Response.Write "Size: " & File.ImageWidth & " x " & File.ImageHeight & " pixels"<BR>
	Next<BR>
	%><BR>

	&lt;/BODY><BR>
	&lt;/HTML><BR>
	</FONT></TD></TR>
	</TABLE>
	<P>
	Click the link below to run this code sample:
	<P>
	<B><A TARGET="_new" HREF="http://localhost/aspupload/07_image/size.asp">http://localhost/aspupload/07_image/size.asp</A></B>
	&nbsp;<A HREF="javascript:;" OnClick="open('helppopup.html','','width=400,height=400');"><IMG SRC="help.gif" BORDER="0" ALT="Why is this link not working?"></A>
	
	</BLOCKQUOTE>
	<B><FONT COLOR="#0000A0">Image Resizing</FONT></B>
	<BLOCKQUOTE>
	AspUpload can be used in conjunction with another Persits Software
	component, <B><A HREF="aspjpeg.html">AspJpeg</A></B>, to create resized versions and thumbnails
	of JPEG images. An evaluation copy of AspJpeg can be downloaded <A HREF="download.html">here</A>.
	<P>
	The code samples <B>resize.asp</B> and <B>resize_upload.asp</B>
	demonstrate how AspJpeg can be used to resize a newly uploaded JPEG
	image. The uploaded and resized images are saved in the same directory
	as the ASP scripts, rather than the usual c:\upload folder,
	to be able to display both images in the browser easily.
	<P>
	<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=3>
	<TR><TD BGCOLOR="#FFFF00">
	<FONT SIZE="1" FACE="Courier New">
	&lt;HTML><BR>
	&lt;BODY><BR>

	&lt;%<BR>

	Set Upload = Server.CreateObject("Persits.Upload")<P>

	' Use AspJpeg to resize image<BR>
	Set Jpeg = Server.CreateObject("Persits.Jpeg")<P>

	' Capture and save uploaded image to the same directory as script<BR>
	Upload.Save Server.MapPath(".")<P>

	For Each File in Upload.Files<BR>
	&nbsp;&nbsp;&nbsp;If File.ImageType <> "JPG" Then<BR>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Response.Write "This is now a JPGE image."<BR>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File.Delete<BR>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Response.End<BR>
	&nbsp;&nbsp;&nbsp;End If<P>

	&nbsp;&nbsp;&nbsp;Jpeg.Open File.Path<P>

	&nbsp;&nbsp;&nbsp;Scale = Upload.Form("Scale")<BR>
	&nbsp;&nbsp;&nbsp;Jpeg.Width = Jpeg.OriginalWidth * Scale / 100<BR>
	&nbsp;&nbsp;&nbsp;Jpeg.Height = Jpeg.OriginalHeight * Scale / 100<BR>

	&nbsp;&nbsp;&nbsp;Response.Write Jpeg.OriginalHeight & "-" & Jpeg.Height<BR>

	&nbsp;&nbsp;&nbsp;Jpeg.Save Server.MapPath(".") & "\small_" & File.FileName<BR>
	%><BR>
	&nbsp;&nbsp;&nbsp;&lt;IMG SRC="&lt;% = File.FileName %>">&lt;BR><BR>
	&nbsp;&nbsp;&nbsp;&lt;IMG SRC="&lt;% = "small_" & File.FileName %>">&lt;P><BR>
	&lt;%<BR>
	Next<BR>
	%><BR>

	&lt;/BODY><BR>
	&lt;/HTML><BR>
	</FONT></TD></TR>
	</TABLE>
<P>
	Click the link below to run this code sample:
	<P>
	<B><A TARGET="_new" HREF="http://localhost/aspupload/07_image/resize.asp">http://localhost/aspupload/07_image/resize.asp</A></B>
	&nbsp;<A HREF="javascript:;" OnClick="open('helppopup.html','','width=400,height=400');"><IMG SRC="help.gif" BORDER="0" ALT="Why is this link not working?"></A>
	<P>
	AspJpeg comes with many more code samples. 
	A <A HREF="livedemo.html">live demo</A> is also available. 
	<P>
	<A HREF="manual_unicode.html"><IMG BORDER="0" SRC="next.gif" ALIGN="RIGHT" ALT="Chapter 8: Unicode Support"></A>
	<A HREF="manual_security.html"><IMG BORDER="0" SRC="previous.gif" ALIGN="RIGHT" ALT="Chapter 6: User Impersonation and Permissions"></A>
	<P>&nbsp;
	</BLOCKQUOTE>
	
	


	</FONT>
	<P>
	<TABLE WIDTH=540 HEIGHT=2 CELLSPACING=0 CELLPADDING=0 BORDER=0>
	<TD BGcolor="#FFCE00"><spacer type=block width=540 height=2></TD>
	</TABLE>
	<P>
	<CENTER>
	<A HREF="index.html"><IMG SRC="logo_small.gif" BORDER=0></A>
	<BR>
	<FONT Face=arial size=1>
	Copyright &copy; 1998 - 2001 <A HREF="http://www.persits.com">Persits Software, Inc.</A><BR>
	All Rights Reserved<BR>
	AspUpload&reg; is a registered trademark of Persits Software, Inc.<BR>
	Questions? Comments? <A HREF="MAILTO:info@aspupload.com">Write us!</A>
	</CENTER>

</TD>
</TABLE>

</BASEFONT>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -