Digital Lego
Everything you ever wanted to know about pixels, but were afraid to ask ...

  Pixels are the most basic unit of any image, moving or still. If you know what your pixels are doing and why, it will help you a LONG way towards working out why those pesky little problems happen when you change your aspect ratio, or try and export to another format.

Resolution:
Digital images are made up of rows and columns of pixels, this is why your screen size is measured in them, e.g. 800x600, 1024x768. This is called the image's resolution. This is not to be confused with such colourful and mind boggling terms as "Dots Per Inch" (DPI) or "Pixels Per Centimeter" (PPC). Ignore that, it's confusing and intricate, and really not much to be bothered with if you're doing this to be a compositor/effects artist etc etc. If you're not here for any of those things and wish to resign your life to staring at a Mac doing pre-press, you're in the wrong place and should bugger off now before you lower the property values.

Just to clarify things, if you're working in the video field, the only value you need to remember as far as DPI goes is 72 (or 28.346 PPC). This is always the value you will be using, regardless of whether you work in film, TV, HD whatever. Now as far as actually image resolutions go, there are LOTS of them, depending on what format you're working in. This can also get confusing, especially when we get into different resolutions for different places.

Pixels are Square Right?
Well it's a logical assumption isn't it? 1 pixel, a 1x1 ratio, just makes sense! Unfortunately this is not true. Due to how TVs work, not all pixels are square. And just to make things even more confusing, Pixels are many many sizes, always rectangular, but not always the same size. Let's take an example, say you're working on a very sexy backplate in Photoshop for your DV home movie:

Photoshop always works in Square Pixels which is to say each pixel is a perfect square ... pixel this means that the Pixel Aspect Ratio of this image is 1x1. Each pixel is 1 unit high by one unit wide.

However, little do you know that when you get into your compositing package, that DV format is not square. To make a DV image fit a television frame ratio (usually 4 wide x 3 high, guys) the pixels that make up a DV image are actually just that little bit longer than they are wide ... pixel - that is to say that (for PAL anyway) the pixel aspect ratio of D1/DV PAL is 1.0666. All of a sudden your sexy matte painting is too narrow, or too wide, or just PLAIN WRONG!, leaving you disillusioned and ready to go out and take up embroidery!

Never fear!
Now is not the time to go out and buy a lot of needles and thread! Every compositing and effects package I have ever seen lets you interpret your footage. That is change the Pixel Aspect Ratio. Which means that if you have a square pixel image going into a D1/DV composition, you can tell your package to treat it like it has the right pixel ratio ... in other words it will stretch your image to fit - with out any quality loss, which is a GOOD THING!. Below is a wee table illustrating some different pixel ratios.

pixel Square Pixels
Uses a 1.0 (1 x 1) pixel aspect ratio. Use this setting if you are working in a square pixel composition. Used with generated footage/web footage. Any Frame Ratio.
 
pixel D1/DV NTSC
Uses a 0.9 (0.9 x 1) pixel aspect ratio. Use this setting if you are working in a D1/DV NTSC composition. Used with footage shot on NTSC Cameras/DVCams. Used for NTSC 4x3 Frame Ratio. Resolutions 720x480, 720x486.
 
pixel D1/DV NTSC Widescreen
Uses a 1.2 (1.2 x 1) pixel aspect ratio. Use this setting if you are working in a D1/DV NTSC Widescreen composition. Used with widescreen footage shot on NTSC Cameras/DVCs. Used for 16:9 Frame Ratio. Resolutions 720x480, 720x486.
 
pixel D1/DV PAL
Uses a 1.0666 (1.0666 x 1) pixel aspect ratio. Use this setting if you are working in a D1/DV PAL composition. Used with footage shot on PAL Cameras/DVCs. Used for 4:3 Frame Ratio. Resolution 720x576.
 
pixel D1/DV PAL WideScreen
Uses a 1.422 (1.422 x 1) pixel aspect ratio. Use this setting if you are working in a D1/DV PAL Widescreen composition. Used with widescreen footage shot on PAL Cameras/DVCs. Used for 16:9 Frame Ratio. Resolution 720x576.
 
pixel Anamorphic 2:1
Uses a 2.0 (2 x 1) pixel aspect ratio. Use this setting if you are working in a Anamorphic composition. Used with footage shot with Anamorphic lenses.


Colour & Transparency
Computer generated images carry their colour information in their pixels. When working on images (remember video is just many many images, viewed quickly), there is also something called Colour Resolution this is basically how many colours are able to be used in the image. Back in the old days, about when I started doing this, they hadn't invented colour yet and everything was black and white - well not quite. Computer images fall into lots of categories when it comes to colour, and the values for colours are calculated differently per pixel depending on the colour resloution of the image. In video and film work, 24-bit "true colour" is used to make up the image. This means that for every pixel in the image the computer has 3 values describing the pixel's colour. A Red value, Green value and a Blue. This gives a combined total amount of about 24 million colours able to be used in the image.

So, if you've ever wondered why effects packages are sometimes slow, think about this: PAL Video is 25 frames per second, each frame is 720 x 576 pixels, a total of 414,720 pixels. Each pixel has 3 values that make up it's colour, making 1,244,160 values the computer has to store for each frame, at 25 frames per second, the computer has to process 31,104,000 values for each second of video. Try that one with a pencil.

Now that we've badly explained colour resolution, the only other value that get's added into the mixture is transparency. Each pixel in a composition, as well as carrying it's 3 values of colour infromation (also called channels) caries a fourth value which represents it's transparency. Each of these four channels are represented by a value between 0 and 255. 0 being black and 255 being white. For the transparency (alpha) channel, this value represents how see-through or solid the pixel is, 0 being totally transparent and 255 totally opaque.

This of course adds another level of complexity to the image, and things slow down while file sizes go up.

To clarify all that waffle in a compact and (hopefully) understandable wrap up ...

Each Image is made up of Pixels,
Each Pixel in a 24-bit Image is made up of 3 Colour Channels and sometimes one Alpha (transparency) Channel
Each Channel is a value between 0 and 255, 0 representing black or "off". 255 representing white or "on".



Ok, well I hope this has been of some help, if you have any questions, feel free to post them on VFX Talk and I will be happy to answer them there.

Good Luck!

ValHallen