*Which code? Images, Sound, Video Y. Mendelsohn When a byte of memory is filled with up to eight 1s and 0s, how does the computer decide whether to represent the code as ASCII, Unicode, Color, MS Word document, etc? Answer: Depends on the OS, however, often the OS will start by opening up the document using the associated extension. So, if the extension is TXT, most PCs will open the document in a text editor, and will assume that the binary values are using the ASCII code. If the extension is for an image such as JPG, the PC will open up the associated imaging application and will use a code for colors to convert each sequence of bytes into a color. (More on this later). Computer Graphics Vocabulary Pixels: tiny dots of white, black, or color that make up images on the screen Resolution: the density of presentation of the pixels E.g. 72 ppi = 72 pixels per inch Color Depth - Pixels PC monitors are divided into tiny squares or dots. Whether drawing images or characters, the drawing is rendered by coloring in every pixel on the screen. The number of different colors that can be displayed by any one pixel depends on the monitor and graphics card. Most of today s monitors/graphics cards can display over 16 million different colors at any one pixel. Color depth: the number of bits devoted to each pixel Even text is drawn by pixels Color Depth Definition: The number of bits used to represent the color of a single pixel. Common values: 24-bit, 16-bit, 30-bit. However, 8-bit and even 1-bit are not unheard of. The greater the number of bits used (a higher color depth), the greater the number of different colors that can be represented. Recall how in the ASCII code, each sequence of 8-bits is mapped to a specific character. When dealing with color, each sequence of bits is mapped to one specific color. For example: 0 might be white 1 might be black 01 might be red 10 might be blue 001 might be orange 010 might be yellow 011 might be violet 0001 might be green etc Color Depth contd Pop-Quiz: How many different colors could be stored if you save your image using 1-bit color depth? Answer: Two colors. There are two possible values that can be stored in 1 bit of memory, 1 or 0. The code used by most programs will treat them as white and black, but they could just as easily be indigo and fuscia. A 1-bit image. Every pixel is colored either black or white 1
2-Bit Grayscale 00 01 10 11 8-Bit Grayscale A 2-bit color pallet using an accepted code called Grayscale An 8-bit grayscale color pallet 24-bit Color True Color Color Pallet with millions of possible choices 24 bits means you have millions of possible colors available to you. For this reason, it is known as true color since the human eye usually accepts those representations as being fairly accurate. Color Depth Impact on File Size Number of pixels x bytes per pixel = file size E.g. 1024x768 resolution image at 16-bit color depth: 16-bit color = 2 bytes per pixel File size (1024x768)x(2 bytes)= 1,572,864 bytes Image File types Usually related to file compression Check the file extension Windows Explorer option to view file type 2
Graphic File Creation Bitmapped Graphics Bit-mapped raster Vector object-oriented (mathematically based) Think of raster / bitmaps as images stored by recording pixels, and vectors as images stored by recording shapes and lines. Images are created and stored by manipulating the colors of pixels on the screen. Most of the image editing applications on the average PC are intended to work with bitmap images. E.g. Adobe Photoshop, MS Paint Vector graphics Images are created and stored by manipulation of lines and shapes on the screen. The relationship of the various figures to each other is stored using mathematical relationships. Software that stores and manipulates vector graphics is less common than with bitmaps. Examples include Adobe Illustrator and the open-source Inkscape. Memory demands on storage are not as high as for bit-mapped images Raw Graphics Files Typically refers to the data captured by an image sensor such as in a digital camera. There is little or no processing that has been done to the recorded image. (e.g. compression) Therefore, these files are typically very large. Typically have the extension.raw Even so-called lossless formats such as TIFF files include some compression and lossiness. File Compression Most images types such as JPG are smaller in size then their lossless counterparts such as RAW of TIFF. How is the size of the file reduced? Removal of duplicate or redundant information. Typically carried out using mathematical formulas calculated by the computer. 3-D Modeling Software Vector graphic file creation Used to create three-dimensional objects with tools similar to those in drawing software Goal for some applications: to create an animated presentation Flexible: can create a 3-D model, rotate it, view it from different angles 3
Animation Graphics over Time Each frame of computer-based animation is a computer-drawn picture; the computer displays these frames in rapid succession Desktop Video: Computers, Film, and TV Analog and Digital Video A video digitizer can convert analog video signals from a television broadcast or videotape into digital data Tweening Instead of drawing each frame by hand, the animator can create key frames and objects and use software to help fill in the gaps Digital Video Digital video cameras capture footage in digital form Digital video can be copied, edited, stored, and played back without any loss of quality Video Production Data compression software and hardware are used to remove redundant data out of movies so that they can be stored in smaller spaces Today most video editing is done using nonlinear editing technology Compare with editing tape in the past Video editing software, such as Adobe Premiere, makes it easy to eliminate extraneous footage, combine clips from multiple takes, splice together scenes, create specific effects and other activities Video Codecs Codecs (in the modern, software sense) encode a stream or signal for transmission, storage or encryption and decode it for viewing or editing If a particular codec was used to compress a video file, software for de-compressing that particular codec must be present on the viewer s hardware. Audio Audio digitizer captures sound and stores it as a data file Synthesizer an electronic instrument that synthesizes sounds using mathematical formulas MIDI (Musical Instrument Digital Interface) standard interface that allows electronic instruments and computers to communicate with each other 4
Popular Digital Audio Formats Format Downloadable Streamable Typically used for... MP3 Yes Yes Ripping (copying) CDs to the computer and to portable audio players WMA Yes Yes Ripping CDs to the computer and for purchased music from online music stores AAC Yes Yes Purchased music from online music stores RealAudio Yes Yes Audio streams from commercial Web sites like CNN MIDI Yes Yes Contains no audio just sequences of commands to control musical instruments and music samples on a PC Accessing Digital Images on the Web Web browser software handles three image file types directly.jpg.gif.png Any other file type ( like.bmp) must be handled with separate software or via browser plug-ins. Hypertext and Hypermedia The Web Hypertext refers to information linked in nonsequential ways Think of clickable text on a web page that takes you to any number of different places. Hypermedia combines text, numbers, graphics, animation, sound effects, music, and other media in hyperlinked documents Media Text Audio Video Graphics Multimedia Multimedia: combination of one or more of the above. Interactive Multimedia: What Is It? Computer Graphics A combination of text, graphics, animation, video, music, voice, and sound effects that allows the user to take an active part in the experience e.g. Gaming, Simulations http://en.wikipedia.org/wiki/computer_graphics Requirements: processor speed, memory, and harddrive storage capacity 5