CSCI 220: HTML Authoring & WWW Programming
Graphics, Sound & Video
Types of Images
Because the Internet (or any network) is only capable of transmitting
information in digital (e.g. 1's & 0's) format, any picture
which you want to use must be "translated" into a digital
format. That is, we must find a way to convert our picture (or
even our videotape) into a bunch of 0s & 1s.
- There are several different varieties & formats of digital
images (Examples: .bmp, .wmf, .gif, .tiff, .jpg)
- We are primarily going to be working with .tiff, .gif & .jpg
- What's the difference between these formats?
- .tiff - this is one of the older image formats around and
is kind of the "base" format that you will see when
images are digitized. While .tiff compression is available, it
is not a very popular format to use with web pages
- .gif - a proprietary format developed by Compuserve, .gif is very handy and
popular format for Web images. Two features supported by .gif make it popular:
- Interlacing = allows you to view a "partial" image
as it is downloaded
- Transparency = allows you to make certain parts of the picture
"transparent" so that it appears to blend into the background.
The main drawback to the .gif format is it's lack of compression
capability
- .jpg - another popular format, especially with background and
non-transparent images. The main advantage of the jpg format is
it's extensive and flexible compression capability.
Image Acquisition & Manipulation
- Step 1: Obtain The Image
- Scanning
Advantages:
- Allows you to digitize practically anything
- Gives you a lot of control over image resolution
Disadvantages:
- Requires a fairly hefty hardware investment;
- Usually wind up with a .tiff file so you need to convert it
to a more "web-friendly" format such as .gif or .jpg
- Digital Cameras
Advantages:
- Eliminates the need for scanning
Disadvantages:
- Expensive, poor resolution
- Screen Shots
Advantages:
- Good way to get images into a format not supported by your
graphics program.
Disadvantages:
- "Grab" Them from Another Site
- Well, maybe "borrow" is a better term. Be very
careful about copyright infringement.
- This is probably the most popular way of obtaining images
for your pages.
- Two ways to do this:
- Direct download
- "Right-Click" over image (with Netscape)
Advantages:
- Obviously very inexpensive.
- There's a lot of good artwork at your fingertips.
- There are many large repositories of image collections free
for the taking.
Disadvantages:
- You need to be careful about copyright infringement of commercial
logos and personal artwork where permission has not been granted.
- Doesn't help you if you want to create "custom"
artwork for your particular site.
- Step 2: If desired, manipulate the image
- Graphics Editors = allow you to create/edit images and transfer
images into different formats
- Simple & Inexpensive
- Lview (Win)
- Clip-To-Gif (Mac)
- Jpegviewer (Mac)
- XV(UNIX)
- Expensive & Complex
- Adobe Photoshop (Mac/Win)
- Corel Photopaint (Win/Mac)
- Step 3: If necessary, select an image format and
save it
- Use .gif if: you want to create transparent or interlaced
images
- to create a transparent image, you must select the GIF89a
option when saving as a .gif
- Use .jpg if: you want to place a rather large, compressed
image onto your page or if you are not concerned with resolution
- Many background images are saved as highly compressed JPEG
images because the files can be dramatically reduced in size and
the need for clarity (it is just a backdrop after all) is not
as important
- Step 4: Embed the image into your Web page
<img src = imagefilename>
Options:
- align = "left", "right", "top",
"middle", "bottom", "textop", "absmiddle",
"absbottom"
- border = #
- width = #, height = #
- hspace = #, vspace = #
- alt = descriptive_text
Buttons, Bars & Bullets
This is probably the context in which graphics are most frequently
used in web pages. Because the images are so small in size, buttons,
bars & bullets allow you to add some pizzazz to your page
with a minimal amount of bandwidth overhead. The syntax for inserting
buttons, bars and bullets is the same as with "standard"
images: simply reference the images with the <img src = filename>
tag. The primary issue is when and how to use these images.
Buttons direct the reader to another location such as the previous,
home or next page. Arrows (left, right, up, down) are the more
standard type of buttons used. Bars demarcate sections of a page
in a more colorful manner than the plain-old <hr>. One
of the more popular uses of bars is the yellow and black "construction"
bar to indicate that a page is "Under Construction",
however, there are many styles to choose from to suit your particular
taste. Finally, bullets allow one to create "bulleted"
lists of items in a more interesting manner than with unordered
lists. You can use multicolored "balls" which provide
the same effect as the <ul> black dot but are more appealing
to the eye. Note however, you will have to "fudge"
the list (just use <br>'s), because <ul> does not
support the use of images in the <li> tag.
There are several good repositories of buttons, bars and bullets
which are free to download and use. A list is provided at the
end of this page.
Sound & Video
As with buttons bars and bullets, sound and video can be added
to your pages. These are far less common because the enormous
size of these files inhibits effective use in page presentation.
The most common use of sound and video is to provide short messages
(usually a welcome message from a company CEO) through a clickable
href (which we will discuss later). For the time being, suffice
it to say that with the limited exception of Microsoft's background
sound and video support, the use of active sound and video in
Web page design is something that is currently hampered by the
limited bandwidth available to most end users.
If you really want to add sound and video to your pages, the following
are supported by (only) the MS Internet Explorer browser:
"controls"
Web Resources
A Word On Bandwidth & Document Aesthetics
Probably one of the most important yet frequently ignored issues
in Web publishing. For the time being, most people do their internetworking
over a phone line. This means that they are getting at best 28.8
kbs throughput. In comparison, most LANs get somewhere in the
vicinity of 100 Mbs throughput. Bandwidth is kind of the electronic
equivalent of like comparing the output of a squirt gun to a fire
hydrant. Unfortunately, at the present time, most people are
wielding squirt guns, so we need to design our pages with that
in mind.
What does this mean for the web author? Don't waste bandwidth.
Don't load down you pages with huge images and sounds which will
take forever to download. You'll lose a potential visitor/customer
before they've even had a chance look at all the wonderful things
your site has to offer. This doesn't mean eliminate all images,
after all, that's the appeal of the Web, just use them judiciously.
Use JPEGs for backgrounds and images which don't have to be transparent.
Don't use a monstrous imagemap just because you feel the need
to have one. In fact, unnecessarily large imagemaps are probably
the primary culprits in wasting bandwidth. A great way to test
whether your page is "too big" is to find a computer
with a 14.4 kbs modem and go to the page. If it takes more than
a minute or so to download, you probably have too much. If have
a really neat-o graphics/sound/applet extravaganza that you just
have to show everyone, give your visitors a choice by making
your main page an "option" page which allows people
to go to either your whiz-bang page or a scaled-down version which
gets them to the information they are looking for quickly and
efficiently.
Your objective shouldn't so much be to dazzle as to provide a
maximum amount of information in a manner which is pleasing to
the eye. It's OK to be creative and let your artistic juices flow.
A lot of times that's what keeps people coming back, the use
of just the right amount of artistry that makes people say: "Wow!
That was a really neat page!". But remember, we are talking
about the "information superhighway" here, and your
objective should be, above all else, the transmission of information
about yourself, your company, your interests, great links, whatever,
to the person who visits your page. If your page is so bogged
down in graphics and sound that people cannot reach the essential
information, then you have defeated the purpose of having a Web
page in the first place.
End of sermon. ;^)
levels of connectivity
There are multiple ways to connect a computer to the internet. It is easy to be confused. As a web author, you ought to know the differences.
- Direct Connection
- In a direct connection, the computer has a direct cable to a router
- (a router is a special 'traffic cop' computer that controls tcp/ip packets)
- The router is in turn connected to the rest of the internet
- Such a connection is very expensive
- Private individuals can rarely afford such a connection
- Generally, only service providers, corporations, or other large institutions have direct connections.
- klingon and cord both have router connections
- We talk to other computers that communicate with the router through the directly connected machines
- A directly connected machine has a permanently assigned IP NUMBER.
- The IP number is 4 bytes long, in the form 256.256.256.256
- The IP number for klingon is 134.68.40.1
- A permanent computer will also frequently have a DOMAIN NAME
- The domain name is the code we are used to using in URLs
- The domain name for klingon is klingon.cs.iupui.edu
- Sometimes computers have more than one domain name.
- Dial - In Connection
- Dialing in:
- If you want to access your account from a home pc, you can use a dial - in style connection
- To do this:
- Your computer MUST have a modem installed
- Find a communications program. Terminal is built into Windows, Mac has a similar program
- Have the terminal program dial IUPUI at 278-1440
- In a few seconds, you will see a 'connect' message on the screen
- Press the enter key a couple of times
- You will see a menu of IUPUI machines
- If you have a cord, indyvax, or other account, you can enter it from this menu
- Klingon is on another menu
- Choose (14) Other hosts
- You will see a new menu.
- Choose (2) Computer Science Sun
- You will be in the familiar klingon login screen
- You are operating klingon remotely
- Your computer is acting only as a dumb terminal
- You cannot take advantage of any software on your own machine
- When you download software via FTP or other protocol, it will be stored on your klingon account, NOT your hard drive at home
Transferring files via dial in connection:
- To transfer information from the klingon account to home machine, you will need to use a transfer program
- Go to the subdirectory in the klingon account where your document resides
- If you are sending a text file (like an html document),
- type
xmodem -st document.name
- otherwise,
- type
xmodem -sb document.name
- (st means send text, sb means send binary)
- In your communication software on the local machine, find a command like
download xmodem
- Specify where on the local machine you want the file placed
- See the sl247 faq for details
Notes about dialin service
- You have console access ONLY
- You can't use openwin, netscape or other graphical features
- You can only use command line tools
- This is still not too bad.
- Use pine for email, pico for editing.
- To test pages, use lynx
- Lynx is text - only, not very pretty, but extremely fast.
- It is a great way to test pages, get textual information
- It cannot handle tables, graphics, javascript
- It can do almost everything else, (including CGI scripting)
- Slip / PPP
- Definition
- Slip - Serial line internet protocol
- PPP - Point to point protocol
- Both do the same thing, PPP is better if you have a choice
- What they do -
- You are sitting at your own computer at home
- You dial into a machine with a permanent account that you have access to
- You activate slip or ppp
- The remote computer has a bank of temporary IP numbers
- It assigns you a number for the duration of the transaction
- Your computer 'thinks' it really has a direct connection
- You can take advantage of your own processor
- This is how you run Netscape, FTP, telnet, other internet protocols on your own machine
- Getting a PPP account from IUPUI
- Go to the basement of the ET building, room 025
- Take at least one formatted 1.44 floppy
- Tell them you need a ppp account and what type of machine you have at home
- Windows 3.1 - they will give you Winsock (a tcpip driver and ppp/slip socket)
- Win '95 - they will give you an instruction packet and some software
- Mac - they will give you MacPPP
- The packages you receive from here are pre-configured for IUPUI
- Configuring your own is not for the faint - of - heart!
- Commercial Service Providers
- Prodigy, AOL, Compuserve
- Customized, privately owned services
- Used to be completely independant
- Much friendlier than internet
- Some control, organization
- Expensive.
- Do have access to internet
- Do allow homepages, with design tools
- Do not allow cgi - scripting, custom browsers.
- Much too limited, expensive for our purposes
- Internet Service Providers
- Iquest, IndyNet, NetCruiser, etc
- Generally give you ppp or slip access
- Allow you to build home pages
- May charge more for disk space used, number of hits
- May or may not allow CGI scripting
- Often charge monthly rate
- Generally a pretty good deal
Lab Assignmnet
Create a page that has examples of the following:
- A background image. (Be sure to adjust your font color so your text
is still readable!)
- A GIF file
- A JPEG file
- A custom horizontal rule graphic
- Some text. It doesn't matter what
- At least one image you have created
- At least one image you have gotten from the web
Some other guidelines to consider:
- Your page should have some sort of theme. It doesn't matter what it is, but
try to tie things together in some way. (Even if it is silly).
- Use the resources below as a starting point, or find your own.
- To create a graphic, use xpaint in unix, paintbrush in Windows, or
whatever program you want.
- If you have created a file in another system, copy it to your own
account via ftp (if you are using a slipp/ppp connection)
- Use xmodem or kermit if you are using
a dialin connection. See the SL251 FAQ for more details.
- Be sure to save your graphics in public_html, and give them proper
permissions. (I used 644.)
Other Places to Explore
Extra Credit: Make an interlaced GIF with a transparent background.
© 1996, Ted D. Biggs, Andrew J. Harris
Dept. of Computer and Information Science,
Indiana University, Purdue University, Indianapolis
email: tbiggs@klingon.iupucs.iupui.edu