Dean's Director FAQ - IMAGES
Another FAQ exists at
MediaMacros, which
is new and extensive.
Images
Question: What is colour depth and palettes and how does it all
affect my Director movie?
Answer:
The term colour depth refers to the amount of graphics memory
(measured in bits) allocated to each pixel (or dot) in an image, and determines
the number of colours that can be used to display that graphic. For example,
an image set to 1-bit colour depth means that any pixel in the image can
only be one of two (2 to the power of 1) colours (black or white in this
case). An 8-bit image allows each pixel to be set to any one of 256 (2 to
the power of 8) colours, and is generally preferred because it represents
a good compromise between colour quality and speed of handling.
It is important to understand that the colour depth of the whole movie can
be different to (and always at least equal to) the colour depth of any individual
image. Your computer may be set to High Colour (16-bit colour depth), meaning
that the movie you produce will “inherit” that colour depth when you save
it. If you run a movie on a computer set to a lower colour depth than the
movie's colour depth, then there will be some distortion of the colours.
A colour palette is simply a selection of colours (256 in the case
of an 8-bit system) from all the possible colours (typically around 16 million)
that is available to the image. If a computer system uses 16-bit colour
or greater, then the choice of displayable colours is sufficiently rich
that most images will display quite effectively. If, however, the colour
depth is set to 8-bit (or less) then a colour palette will be used to display
the graphic on the screen. Windows 95 supports a standard colour palette
that you can use, but also allows any program (like Director) to switch
colour palettes on the fly. Consequently, Director allows you to create
a colour palette that best suits each image in your presentation so that
when you play the presentation on an 8-bit system, it transforms the palette
for each image on the fly, giving you the best possible results. If you
want Director to switch between colour palettes for different parts of your
movie, you have the limitation that it slows down the presentation, and
you may have to design your presentation so that you never attempt to display
two images with different colour palettes on the Stage at one time. Most
computers today have sufficient graphics memory to display colour depths
of 16 bit or higher.
When you save an image as an indexed colour in PICT format in a program
like PhotoShop, you create a custom palette for that image. When you import
the file into Director, it will import the colour palette as a separate
cast member. This cast member will eb displayed as a table, indexing all
the colours your image uses.
So in summary
A movie can have a default colour palette, like web 216, which you may use
so that the colours will display in the same way from computer to computer.
Each image in a movie can refer to its own colour palette, which can be
of various colour depths. e.g. 8 bit (256 colours), 4 bit (16 colours)
The lower the colour depth of an image the smaller the file size. A 4 bit
image of 400x300 pixel dimesions will be half the file size of an 8 bit
version of the image at 400x300.
Halos
Question: Why do some background transparent images have a "Halo"?
Answer:
Importing 8 or 16 bit graphics with a white background will sometimes appear
to have a halo around them made up of white pixels. If you examine them
closely you will see that these are actually off-white, anti-aliased pixels.
There are 2 ways to remedy this.
1. Use 32 bit images with an alpha channel. The alpha channel contains transparency
information (see below) and increases file size.
2. Remove the anti-aliased edge with a true white edge but this will give
the edge a pixelated look.
3. Anti-alias the edge to the background colour of your stage.
4: Use a mask image in the cast with mask ink on the sprite. See the mask
tutorial to see how to do this.
Check out the DOUG
article 'Soft Masking Technique and Drop Shadow'.
And here's another technique for Anti-aliasing.
Alpha Channels
Question: What is an alpha channel?
Answer:
An alpha channel is embedded information in an image that describe transparencies
within the image. An image with an alpha channel contains up to 24-bit color
information, as well as an extra 8-bit grayscale channel (the alpha channel)
to describe the different levels of transparency in the image. (Director
will only read an Alpha Channel that refers to the last 8 bits in a 32 bit
image file.) Alpha values range from 0 (black) to 255 (white). A pixel that
has an alpha value of 0 is totally transparent (invisible), so anything
placed behind it will be seen. A pixel with an alpha value of 255 is totally
opaque, so any graphic behind it will not be visible. Gray pixels represent
intermediate levels of transparency by how close to white or black they
are. The alpha channel can be created in a Paint program like PhotoShop/Fireworks,
or when generating an image from a 3D renderer like 3D Studio Max. Only
certain image formats support alpha channels and Director does not recognise
all the formats. Director can import alpha channels made with PhotoShop
(psd file) or Fireworks (png file), but Fireworks produces the more superior
alpha channel of the two.
MediaLab make Xtras
for Director including PhotoCaster 3, allowing you to import PhotoShop layers
and AlphaMania to give additional alpha channel support.
For more Information about how alpha channels work in Director see:
DOUG -
Alpha Channel Importing in Director 7
DOUG -
Shining a Flashlight with Alpha Channels (Using Imaging Lingo)
Importing Vector Images
Question: How can I import a vector based in EPS or Illustrator
into Director?
Answer:
Illustrator files (AI) or other EPS files are not natively supported in
Director. You do have a couple options on how to import them into Director:
1. You can import SWF vector files into Director. These can be created by
imprting the AI / EPS into Flash or simply by exporting to SWF from within
the vector-based application you are using. There is a plugin available
for Illustrator and for CorelDraw that allows swf exporting. Other programs
are available that output in this format as well.
2. You can use a 3rd Party Xtra like PS2VS
(it's free) to convert the file to a Director vector shape. (Works with
Director 7 and 8.)
Macromedia have a technote on Importing
vector and EPS files into Director.