"jpeg2swf *.jpg" - Create a Slide Show

This section provides a tutorial example on how to create a slide show with pictures in JPEG format with a specific display speed and size.

First, let's try to create a slide show with a set of pictures using JPEG2SWF tool. Pictures used in this tutorial are from the landscape wallpaper collection on my Windows 7 system:

C:\herong>copy C:\Windows\Web\Wallpaper\Landscapes\*.jpg .

C:\Windows\Web\Wallpaper\Landscapes\img10.jpg
C:\Windows\Web\Wallpaper\Landscapes\img11.jpg
C:\Windows\Web\Wallpaper\Landscapes\img12.jpg
C:\Windows\Web\Wallpaper\Landscapes\img7.jpg
C:\Windows\Web\Wallpaper\Landscapes\img8.jpg
C:\Windows\Web\Wallpaper\Landscapes\img9.jpg
        6 file(s) copied.
        
C:\herong>\local\SWFTools\jpeg2swf -o landscapes.swf img*.jpg               

C:\herong>\local\bin\flashplayer_13_sa landscapes.swf

You should see 6 beautiful landscape pictures displayed as a slide show at a speed of 1 picture per second.

We can change the display speed using the "-r nn.nn" option, where nn.nn specifies display speed as number of pictures per second. "-r nn.nn" is also called frame rate in SWF term.

C:\herong>\local\SWFTools\jpeg2swf -r 0.25 -o landscapes.swf img*.jpg

C:\herong>\local\bin\flashplayer_13_sa landscapes.swf

Now you should see pictures are displayed at a low speed, 0.25 pictures per second, or 1 picture per 4 seconds.

You can also scale down the size of the picture using "-f -X nnn -Y mmm", where nnn specifies the width of the display, and mmm specifies the height.

C:\herong>\local\SWFTools\jpeg2swf -f -X 384 -Y 240 -r 0.25 
   -o landscapes.swf img*.jpg

C:\herong>\local\bin\flashplayer_13_sa landscapes.swf

Now you should see the slide show on a smaller display.

We can also take a look at the "swfdump" output on the resulting SWF file:

C:\herong>\local\SWFTools\swfdump landscapes.swf

[HEADER]        File version: 4
[HEADER]        File size: 1695627
[HEADER]        Frame rate: 0.250000
[HEADER]        Frame count: 6
[HEADER]        Movie width: 384.00
[HEADER]        Movie height: 240.00
[009]         3 SETBACKGROUNDCOLOR (00/00/00)
...

The output confirms that the slide show uses a 384x240 display and a 0.25 fps (frames per second) speed.

Notice that the file size in the SWF header is about 1.6M for all 6 pictures with the default quality level used to compress the picture data. If you want to have some saving on the file size, you can use the "-q nnn" option to use a lower quality level:

C:\herong>\local\SWFTools\jpeg2swf -q 20 -f -X 384 -Y 240 -r 0.25 
   -o landscapes.swf img*.jpg

C:\herong>\local\SWFTools\swfdump landscapes.swf 
[HEADER]        File version: 4
[HEADER]        File size: 793334
[HEADER]        Frame rate: 0.250000
[HEADER]        Frame count: 6
[HEADER]        Movie width: 384.00
[HEADER]        Movie height: 240.00
[009]         3 SETBACKGROUNDCOLOR (00/00/00)
...

With "-q 20" (20% quality level), file size dropped by half from 1.6M to 0.8M. Hope you don't feel any visual differences while playing the resulting slide show.

When using wildcard input file name pattern, Windows will provide the actual file name list in alphabetical order. If you want to have a different picture order in result slide show, you can specify the file name list explicitly:

C:\herong>\local\SWFTools\jpeg2swf -q 20 -f -X 384 -Y 240 -r 0.25 
   -o landscapes.swf 
   img12.jpg img7.jpg img10.jpg img11.jpg img9.jpg img8.jpg

Enjoy the slide show with new picture sequence!

Table of Contents

 About This Book

 Introduction of Adobe Flash

 Adobe Flash Player Plugin for Firefox

 Adobe Flash Player Plugin for Chrome

 Adobe Flash Player Plugin for Safari

 Adobe Flash Player ActiveX for IE

 Using "object" Elements for Flash Files

 Using "embed" Elements for Flash Files

 "mp3player" - MP3 Music Player

 SWFObject - Hidding "object" behind JavaScript

 Flash Player Projector

SWFTools - SWF File Manipulation Tools

 What Is SWFTools?

 Downloading and installing SWFTools

 SWFDump - SWF File Dump Tool

 "swfdump" - Dump SWF File Header

 "swfdump -E" - Generate HTML Code

 JPEG2SWF - JPEG to SWF File Conversion Tool

"jpeg2swf *.jpg" - Create a Slide Show

 PDF2SWF - PDF to SWF File Conversion Tool

 "pdf2swf" - Convert PDF to SWF

 "master and slave" - Viewer and Page Frames

 SWFCombine - SWF File Merging Tool

 "swfcombine masterfile viewpoint=slavefile"

 "swfcombine -a" - Concatenate SWF Files

 "swfcombine -d" - Change Frame Rate and Size

 SWFC Script to Generate Flash SWF Files

 ActionScript Embedded in SWFC Script

 AS3Compile - ActionScript 3 Compiler

 Adobe Flex SDK 4

 SWF File Structure and Tags

 SWF File Processing Rules

 SWF Files for Video and Audio Streams

 Outdated Tutorials

 References

 Full Version in PDF/EPUB