My Blog List

Showing posts with label Computer Graphics. Show all posts
Showing posts with label Computer Graphics. Show all posts

Tuesday, 28 July 2015

Computer Graphics

Computer Graphics

Computer graphics is extensive, complex and diversified technology. Computer Graphics is a field of computer science that is concerned with digitally synthesizing and manipulating visual contents. It a technique of manipulate visual and geometric information using computational techniques. Computer graphics refers to the creation, storage and manipulation of pictures and drawings using a digital computer. Computer graphics are pictures that are generated by a computer using different technique. With developments in computing technology interactive computer graphics has become an effective tool for presentation of information in such diverse fields as science, engineering, medicine, business, industry, government, art, entertainment, advertising, education, and training. There is virtually no field in which graphical displays cannot be used to some advantage and that is the basic reason why application of computer graphics is so widespread.
Graphical representation makes the study of anything much more interesting. It is a fact that one picture is worth a thousand words. So quite naturally interfaces empowered with Graphics enhances the communication between the computer and its users. Representation of a huge numbers in the form of a graph or a picture helps in better understanding and interpretation of the characteristics or pattern of the data contained in the set of numbers. Graphic displays also improve understanding complex systems, and visualization of two-dimensional (2D), three-dimensional (3D) objects.
Two major 2D graphic types: Bitmap (Raster) and Vector images.

Raster Graphics

Raster Graphics consist of illustrations created using pixels; Rectangular grid of cells of equal size and each cell has its own color. These cells are also called pixels. Raster graphics are also called bitmaps. Digital photographs are the most common type of raster graphics.
Digital photographs in general are raster graphics. Digital camera, uses a certain number of megapixels. This refers to the number of pixels used for a single picture. A defining characteristic of a raster graphic is that when it’s zoomed in very closely, it start to show the actual pixels.
An important property of a raster graphic is its resolution. Resolution indicates the amount of detail, so a higher resolution means more detail. Higher resolution means more pixels, which is why a larger number of megapixels for a digital camera results in sharper photographs.

Vector graphics

Vector graphics consist of illustrations created using line work. In technical terms, you use points, lines, curves and shapes to create the illustration. Vector graphics are based on vectors, also referred to as paths. One of the key characteristics of a vector graphic is that the line work is sharp, even when zoomed in very closely. In a computer application, the line work is stored as a mathematical formula that describes the exact shape of the line. So when its zoomed in, remains a line.

Photo-realistic illustration that is not actually a photograph, the illustration typically consists of very detailed vector graphic containing hundreds or thousands of lines. Vector graphics are created and edited using illustration software. There are a number of different illustration applications. One of the most widely used ones is Illustrator by Adobe. Others include CorelDraw by the Corel Corporation and the open source applications Inkscape and Xara Xtreme. Vector graphics can be stored in a number of different file formats, including AI, EMF, SVG and MWF.

Saturday, 17 January 2015

Image File Format

JPG, GIF, TIFF, PNG, BMP. What are they, and how do you choose? These and many other file types are used to encode digital images. The choices are simpler than you might think.

Part of the reason for the plethora of file types is the need for compression. Image files can be quite large, and larger file types mean more disk usage and slower downloads. Compression is a term used to describe ways of cutting the size of the file. Compression schemes can by lossy or lossless.

Another reason for the many file types is that images differ in the number of colors they contain. If an image has few colors, a file type can be designed to exploit this as a way of reducing file size.

Lossy vs. Lossless compression

You will often hear the terms "lossy" and "lossless" compression. A lossless compression algorithm discards no information. It looks for more efficient ways to represent an image, while making no compromises in accuracy. In contrast, lossy algorithms accept some degradation in the image in order to achieve smaller file size.

A lossless algorithm might, for example, look for a recurring pattern in the file, and replace each occurrence with a short abbreviation, thereby cutting the file size. In contrast, a lossy algorithm might store color information at a lower resolution than the image itself, since the eye is not so sensitive to changes in color of a small distance.

Number of Color

Images start with differing numbers of colors in them. The simplest images may contain only two colors, such as black and white, and will need only 1 bit to represent each pixel. Many early PC video cards would support only 16 fixed colors. Later cards would display 256 simultaneously, any of which could be chosen from a pool of 224, or 16 million colors. New cards devote 24 bits to each pixel, and are therefore capable of displaying 224, or 16 million colors without restriction. A few display even more. Since the eye has trouble distinguishing between similar colors, 24 bit or 16 million colors is often called TrueColor.

File Types Explained

TIFF is, in principle, a very flexible format that can be lossless or lossy. The details of the image storage algorithm are included as part of the file. In practice, TIFF is used almost exclusively as a lossless image storage format that uses no compression at all. Most graphics programs that use TIFF do not compression. Consequently, file sizes are quite big. (Sometimes a lossless compression algorithm called LZW is used, but it is not universally supported.)

PNG is also a lossless storage format. However, in contrast with common TIFF usage, it looks for patterns in the image that it can use to compress file size. The compression is exactly reversible, so the image is recovered exactly.

GIF creates a table of up to 256 colors from a pool of 16 million. If the image has fewer than 256 colors, GIF can render the image exactly. When the image contains many colors, software that creates the GIF uses any of several algorithms to approximate the colors in the image with the limited palette of 256 colors available. Better algorithms search the image to find an optimum set of 256 colors. Sometimes GIF uses the nearest color to represent each pixel, and sometimes it uses "error diffusion" to adjust the color of nearby pixels to correct for the error in each pixel.

GIF achieves compression in two ways. First, it reduces the number of colors of color-rich images, thereby reducing the number of bits needed per pixel, as just described. Second, it replaces commonly occurring patterns (especially large areas of uniform color) with a short abbreviation: instead of storing "white, white, white, white, white," it stores "5 white."

Thus, GIF is "lossless" only for images with 256 colors or less. For a rich, true color image, GIF may "lose" 99.998% of the colors.

JPG is optimized for photographs and similar continuous tone images that contain many, many colors. It can achieve astounding compression ratios even while maintaining very high image quality. GIF compression is unkind to such images. JPG works by analyzing images and discarding kinds of information that the eye is least likely to notice. It stores information as 24 bit color. Important: the degree of compression of JPG is adjustable. At moderate compression levels of photographic images, it is very difficult for the eye to discern any difference from the original, even at extreme magnification. Compression factors of more than 20 are often quite acceptable. Better graphics programs, such as Paint Shop Pro and Photoshop, allow you to view the image quality and file size as a function of compression level, so that you can conveniently choose the balance between quality and file size.

RAW is an image output option available on some digital cameras. Though lossless, it is a factor of three of four smaller than TIFF files of the same image. The disadvantage is that there is a different RAW format for each manufacturer, and so you may have to use the manufacturer's software to view the images. (Some graphics applications can read some manufacturer's RAW formats.)

BMP is an uncompressed proprietary format invented by Microsoft. There is really no reason to ever use this format.

PSD, PSP, etc. , are proprietary formats used by graphics programs. Photoshop's files have the PSD extension, while Paint Shop Pro files use PSP. These are the preferred working formats as you edit images in the software, because only the proprietary formats retain all the editing power of the programs. These packages use layers, for example, to build complex images, and layer information may be lost in the nonproprietary formats such as TIFF and JPG. However, be sure to save your end result as a standard TIFF or JPG, or you may not be able to view it in a few years when your software has changed.