Add an effect to a photo on a Web page using a Java applet

Source: Internet
Author: User
Tags ftp prepare zip
Program | Web page

1. Prepare source files

Select the photos to be placed on the Web page, scan the image files with scanners, and then use Photoshop and other image processing software to deal with images of the size of 300x300 pixels, Finally save or use the image viewing software such as Acesee to convert to. jpg format and save to the new folder photo (note that you should never use Chinese characters to name this folder). Now let's assume that these photo images are photo1.jpg, photo2.jpg, Photo3.jpg, respectively. Among them, Photo1.jpg is the main photo, photo2.jpg and photo3.jpg as auxiliary photos, it is best to choose different periods of photos to reflect the overall picture of the individual. In order to let others know about you, you can also create an HTML-formatted description file that contains some necessary explanatory information. This file is set to Note.htm, and the same file is saved to the photo folder.

2. Prepare HTML Editor

The old saying cloud: 工欲善其事 its prerequisite.

In order to use Java code to prepare a Web page, you need an HTML code editor. Recommended use of Web Weaver 98. This program can be downloaded from the Internet, this program is on the internet on February 1, 1999 1.02 version, download absolute path named Ftp://ftp.simtel.net/pub/simtelnet/win95/html/webwv982.zip, download size of about 3.7M. You can also go to the download site (http://www.download.com), using the search function provided above, to the Web Weaver keyword search to get the Web Weaver 98 download link, after downloading the program installed, tools, even prepared.

3. Make a Web page file with a Java applet with different effects

The process of making a Web page with a Java applet is simpler, as long as you enter the appropriate Java code into the HTML editor and then save the document as HTML (the HTML files for the following two effects are effect1.htm and effect2.htm, respectively), Save to the photo folder.

(1) A woman on one side of the water

"Bicao Gray, white mist boundless, there is a woman, in the water side ..."

In fact, the state of the song can also be realized on the Web page. Now assume that you are a beautiful woman in the picture, and you can make it visible in the water by following the code.

 
  
<center> <applet archive= "Anwater.jar" code= "Anwater.class" "width=" height= "> <param name="  Credits "Value=" Applet by Fabio Ciucci (www.anfyjava.com) "> <param name=" res "value=" 1 "> <param name=" image " Value= "Photo1.jpg" > <param name= "Light" value= "yes" > <param name= "minlight" value= "0" > <param name= "  Maxlight "value=" > <param name= "autodesign" value= "YES" > <param name= "Density" value= "5" > <param Name= "Fishnum" value= "0" > <param name= "Cross" value= "NO" > <param name= "crossfactor" value= "> <par" Am Name= "rainsize" value= "0" > <param name= "rainfactor" value= "ten" > <param name= "srainsize" value= "0" > &L T;param name= "Srainfactor" value= "a" > <param name= "fixdrop" value= "NO" > <param name= "fixdropx" value= "0" &  Gt <param name= "fixdropy" value= "0" > <param name= "fixdrops" value= "0" > <param name= "Fixdropf" value= "0" > <param name= "Pressure"Value= "> <param name=" fluidmode "value=" Water "> <param name=" interactive "value=" YES "> <param na Me= "overimg" value= "NO" > <param name= "overimgx" value= "0" > <param name= "overimgy" value= "0" > <param n Ame= "Textscroll" value= "no" > <param name= "regcode" value= "no" > <param name= "reglink" value= "no" > <pa Ram Name= "Regnewframe" value= "NO" > <param name= "regframename" value= "_blank" > <param name= "statusmsg" Value= "Water applet" > <param name= "memdelay" value= "1000" > <param name= "Priority" value= "3" > <param n  Ame= "Minsync" value= "ten" > Sorry, your browser ' t doesn Java. </applet> </center>
 

(2) Display 3 photos of different periods

Insert the following Java code into the HTML code of your Web page to turn on 3 photos and click any one of them to link to the Photonote.htm Web page and read the instructions.

 
  
<center> <applet archive= "Bookflip.jar" code= "Bookflip.class" "width=" height= "> <param name=" Credits "Value=" Applet by Fabio Ciucci (www.anfyjava.com) "> <param name=" res "value=" 1 "> <param name=" image1 "Value=" photo1.jpg "> <param name=" link1 "value=" note.htm "> <param name=" statusmsg1 "value=" Anfy 1 "> ;p Aram Name= "Flip1" value= "4" > <param name= "image2" value= "photo2.jpg" > <param name= "link2" value= " Note.htm "> <param name=" statusmsg2 "value=" Anfy 2 "> <param name=" flip2 "value=" 2 "> <param name=" image 3 "value=" photo3.jpg "> <param name=" link3 "value=" note.htm "> <param name=" statusmsg3 "value=" ANFY 3 "> &L T;param name= "FLIP3" value= "7" > <param name= "Speed" value= "4" > <param name= "Pause" value= "1000" > <par Am Name= "Extrah" value= "> <param name=" Flipcurve "value=" 2 "> <param name=" Shading "value=" 0 "> <par Am Name= "Backr" value= "> <"param name= "backg" value= "> <param name=" backb "value=" 160 "> <param name=" overimg "value=" NO "> <pa Ram Name= "OVERIMGX" value= "0" > <param name= "overimgy" value= "0" > <param name= "regcode" value= "NO" > <p Aram Name= "Regnewframe" value= "NO" > <param name= "regframename" value= "_blank" > <param name= "Memdelay" value= "1000" > <param name= "Priority" value= "3" > <param name= "Minsync" value= "ten" > Sorry, your browser do  ESN ' t support Java. </applet> </center>
 

These are the Java applet code for both effects. Remember to save the HTML file that you inserted this code into the photo folder.

4. Obtain the remaining necessary supporting documents

Download a tool software called ANFY Java 1.4 on the network. The absolute path name for the download is ftp://ftp.digital.com/pub/micro/pc/simtelnet/win95/java/anjava14.zip and the download size is 3227K. You can also go to the download site to anfy Java keyword search to get its download link. After you have installed this tool software, find Bookflip.class, Anfy.class, Lware.class, Filesanfy teamanfy javaappletookflip in the folder C:Program. Bookflip.jar and Anwater.class, Anwater.jar, etc.. class files are copied to the photo folder. The supporting files are ready as well.

5. Test and use the corresponding Web page

With Java-enabled browsers opening the effect1.htm files and effect2.htm, you'll see the wonders of the Java applet. If you are not satisfied with the effect, you can reopen the HTML file with the HTML editor and adjust the various parameters in the corresponding code snippet until you are satisfied.

If you add some other necessary content to a Web page with a Java applet, you can form your own unique Web page. As for the home page or to do from the page, it depends on your needs. Because the Java code above does not consider partitioning effects, it simply centers the Java effect horizontally on the browser.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.