NetSnap Example

The scaling option

This example demonstrates the scaling option of NetSnap. Scaling allows you to adjust the size of the image, relative to its base size. The base size of the image is determined by the camera settings, but usually defaults to 320 x 240 pixels. For some applications it is desirable to reduce the size of the image (the smaller the image, the faster the load times), especially for self-updating images on a feed.

There are 2 items to consider when writing the HTML code:

  1. The scale= option
  2. The WIDTH and HEIGHT parameters to the IMG tag.

The scale option determines the percentage factor by which the image is scaled from the base size. To calculate the values for the WIDTH and HEIGHT parameters, simply multiply the base WIDTH and base HEIGHT by the percentage factor:

For a 320 x 240 image this would be:

WIDTH: 320 x 25% = 80
HEIGHT: 240 x 25% = 60

 

The HTML code to accomplish the above is:

If you have a static IP number:

<IMG SRC="http://123.456.78.9/netsnap.jpg?scale=25" width="80" height="60">
<IMG SRC="http://123.456.78.9/netsnap.jpg?scale=50"
width="160" height="120">
<IMG SRC="http://123.456.78.9/netsnap.jpg?scale=75"
width="240" height="180">

If you have a dynamic IP number:

<IMG SRC="http://lookup.netsnap.com/000035/netsnap.jpg?scale=25" width="80" height="60">
<IMG SRC="http://lookup.netsnap.com/000035/netsnap.jpg?scale=50"
width="160" height="120">
<IMG SRC="http://lookup.netsnap.com/000035/netsnap.jpg?scale=75"
width="240" height="180">

 


To insert the above image using the Front Page Web page editor

  1. Click on the "Insert Image" button
  2. Pick "Other location"
  3. Select "From location"
  4. Type in the location as: "http://123.456.78.9/netsnap.jpg?scale=25" if you use a static IP number,
    or "http://lookup.netsnap.com/000035/netsnap.jpg?scale=25" if you use a dynamic IP number.
  5. Right click on the image box shown in the FrontPage editor after you completed the above steps.
  6. Select "Image Properties" from the pop up menu
  7. Click on the "Appearance Tab"
  8. Check "Specify Size" and fill in the width and height fields (for a scale value of 25, and a base image size of 320x240 the value should be 80 x 60).
  9. Repeat steps 1-9 for the other 2 images.
  10. Note: that while in the FrontPage editor the image will remain blank.

Note:
In the above examples replace the IP number (123.456.78.9) or the NetSnap ID number (000035/netsnap.jpg) with the values required for YOUR NetSnap location. You can click the Info button on your NetSnap menu bar to obtain the values for your copy of NetSnap.

 

Return to Examples Selection Page