13.07.2013 Views

PostGIS Raster : Extending PostgreSQL for The Support of ... - CoDE

PostGIS Raster : Extending PostgreSQL for The Support of ... - CoDE

PostGIS Raster : Extending PostgreSQL for The Support of ... - CoDE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4-foot logo. <strong>The</strong> file size is the same because the only difference in file is one number defining the size<br />

<strong>of</strong> the file. Most vector-based logos are going to be under 100 KB. For this reason, vector files are<br />

ideally suited <strong>for</strong> transfer over the Internet.<br />

File Formats<br />

Common vector <strong>for</strong>mats include EPS (Encapsulated PostScript), WMF (Windows Metafile), AI<br />

(Adobe Illustrator), CDR (CorelDraw), DXF (AutoCAD), SVG (Scalable Vector Graphics) and PLT<br />

(Hewlett Packard Graphics Language Plot File).<br />

Modern displays and printers are raster devices, vector <strong>for</strong>mats have to be converted to raster <strong>for</strong>mat<br />

be<strong>for</strong>e they can be displayed or printed. Or in graphic work, devices such as cameras and scanners<br />

produce essentially continuous-tone raster graphics that are impractical to convert into vectors. So<br />

an image editor will operate on the pixels rather than on drawing objects defined by mathematical<br />

expressions.<br />

2.3.2 <strong>Raster</strong> Images<br />

A raster image (or bitmap) is a 2-dimensional array data structure representing a rectangular grid<br />

<strong>of</strong> pixels, or dots or points <strong>of</strong> color. A raster image is characterized by its width and height in pixels<br />

and by the number <strong>of</strong> bits per pixel. This number determines the number <strong>of</strong> colors can be represented<br />

in the image.<br />

Resolution<br />

<strong>The</strong> resolution <strong>of</strong> a raster image is expressed in terms <strong>of</strong> the dots per inch or dpi. Printer resolution<br />

is also measured in dots per inch. Typical desktop laser printers print at 300 - 600 dpi. Printers with<br />

higher dpi are capable <strong>of</strong> producing smoother and cleaner output. Nevertheless, the quality <strong>of</strong> a raster<br />

image depends on its resolution (dpi) and the capabilities <strong>of</strong> the printing technology [9]. For example,<br />

a 300 dpi raster image will output at the same quality on a 300 dpi laser printer as on a 2,500 dpi<br />

printer. By increasing size <strong>of</strong> a 300 dpi raster image, the tiny pixel squares will become bigger and<br />

create jaggy edges as no additional in<strong>for</strong>mation is added. In this case, the raster image losses quality.<br />

Exammple in Figure 2.12 shows the jaggy edges <strong>of</strong> raster image through zooming effect. In contrast,<br />

When decreasing the size, the squares get smaller and the image retains its original edge without<br />

jaggies.<br />

Figure 2.12: <strong>The</strong> original vector image is on the left side. <strong>The</strong> upper-right image illustrates magnification<br />

<strong>of</strong> 7x as a vector image. <strong>The</strong> lower-right image illustrates the same magnification as a raster<br />

image [29].<br />

Color<br />

As raster images are reproduction <strong>of</strong> real world, a large number <strong>of</strong> colors will be required to render<br />

raster images accurate as their original sources. For example, if scanner works at 24-bit color (16<br />

million colors), most human eyes could not distinct the difference between the original image and<br />

the scanned raster image. In contrast, if a smaller color palette with 256 colors is used, it would be<br />

10

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!