Archived Article
developer.com
Search EarthWeb
CodeGuru | Gamelan | Jars | Wireless | Discussions
Navigate developer.com
Architecture & Design  
Database  
Java
Languages & Tools
Microsoft & .NET
Open Source  
Project Management  
Security  
Techniques  
Voice  
Web Services  
Wireless/Mobile
XML  

Developer Jobs

Be a Commerce Partner
Reference Library
Web Hosting
Check Software Prices
Send a Press Release
Tech Magazines - FREE
Compare Prices & Shop
Submit Your Site
Free Site Monitoring
Free Server Magazines
Shopping Cart

 

 

Developer News -
ASAP Off to Late Start    November 11, 2003
Adobe Purchase Seen Protecting PDF Position    November 10, 2003
JBoss Allies With Iona    November 10, 2003
Open-Source Portlet Site Opens For Business    November 10, 2003
Free Tech Newsletter -

RealText and RealPix
By John Maxwell Hobbs

Go to page: Prev  1  2  

RealPix

The RealPix markup format is very simple to create and very complex behaviors can be generated by very compact code. All contents of a RealPix document are contained within the <imfl> tag and are stored in files with the .rp extension. RealPix supports GIF, JPEG, STiNG, and bitmap image formats.

The first example is a 20 second long sequence of three JPEG images. It begins with a fade in from black, does a 5-millisecond crossfade between each image, and ends by fading to black.

The <head/> tag contains all the attributes of the presentation. In this case, the time format has been set to milliseconds. Time can also be specified in the
dd:hh:mm:ss.xyz
, where dd=days, hh=hours, mm=minutes, ss=seconds and xyz=milliseconds. Also specified in the <head/> is the minimum bitrate for the presentation, and the size of the canvas for the images.

<imfl>

<img handle="1" name="flags.jpg">
<img handle="2" name="longshot.jpg"
> <img handle="3" name="oldwall.jpg"> <fadein start="0" duration="500" target="1" aspect="false"> <crossfade start="5000" duration="500" target="2" aspect="false"> <crossfade start="10000" duration="500" target="3" aspect="false"> <fadeout start="15000" duration="500" color="#000000/"> </fadeout> </crossfade></crossfade></fadein></imfl>

The next presentation fleshes out the same presentation with a title, author and copyright information and a URL that allows a Web page to be launched in a browser window when the presentation is clicked on. All of these attributes are contained within the documents <head/>.

RealPix allows for a wide variety of transition effects, other than fades. The next example illustrates the use of the "push" wipe. The new transition code, which only required the changing of two lines, looks like this:

<fadein start="0" duration="500" target="1" aspect="false">
<wipe type="normal" direction="left" start="5000" duration="500" target="2/">
<wipe type="push" direction="right" start="10000" duration="500" target="3/">
<fadeout start="15000" duration="500" color="#000000/">

</fadeout></wipe></wipe></fadein>

Effects can be applied to single images. The <viewchange/> tag allows for zoom and pan effects as shown in the next example.

The zoom in is accomplished with the following code:

<viewchange start="1000" duration="3000" srcx="80" srcy="60" srcw="160" srch="120">

</viewchange>

The
x
and
y
coordinates of the source region to be enlarged are specified with the
srcx
and
srcy
. The
srcw
and
srch
tags specify the size of the section to be enlarged. At the end of this transition, the 160x120 source has been blown up to 320x240.

The panning is accomplished with the following code:

<viewchange start="5000" duration="3000" srcx="0" srcy="60" srcw="160" srch="120">

</viewchange>

By changing the x-axis to 0, and keeping the dimensions the same, the image is panned to the left.

The images in this presentation have been modified with the JPEGTRAN utility included with the G2 authoring guide from RealNetworks. JPEGTRAN modifies the files for streaming so that packet loss has less destructive consequences for the image quality.

The examples in the article have only touched on the possibilities of these two media types. Many good examples are available on RealNetworks' G2 showcase site. When combined with SMIL, RealText and RealPix can be used to create very sophisticated interactive multimedia presentations. Since presentations are created using distributed media, they are easy to update and maintain and their media content is reusable. Considering the installed base of over 1.5 million G2 players, and RealNetworks new commitment to open standards, these formats are realistic alternatives to proprietary technologies like Shockwave and PowerPoint.

John Maxwell Hobbs is a musician and has been working with computer multimedia for over fifteen years. He is currently in charge of multimedia development at Ericsson CyberLab New York. His interactive composition Web Phases was recently one of the winners of ASCI's Digital '98 competition and is currently on exhibit at the New York Hall of Science. He is also on the board of directors of Vanguard Visions, an organization dedicated to fostering the work of artists experimenting with technology. He is the former producing director for The Kitchen in New York City.


Go to page: Prev  1  2  



Techniques Archives

Jupitermedia is publisher of the internet.com and EarthWeb.com networks.
Copyright 2003 Jupitermedia Corporation All Rights Reserved.

Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.
Advertise on EarthWeb
http://www.earthweb.com/
http://www.internet.com/