There are lots to talk about graphic design and digital image manipulation, however before we get there, let’s talk about fundamental things, there are two types of digital graphic images: vector and raster (aka bitmap).
Both vector and raster have their own characteristic, advantages and purpose. So they are both competing and also complement each other.
Let’s talk about each one of them.
Raster
This is the most common type of digital image because it is familiar in our daily life, which is digital photos.
If you take a photo using a digital camera and smartphone, then upload those photos to Instagram, or share via messaging, usually, it is in JPG format. It shows from the file name (such as DSC123.jpg). JPG is one of the most popular types of raster formats.
Raster is a type of digital image that represents an image as a set of dots or matrix. Each dot is called a pixel, as the smallest element of an image. In black and white images, pixels can only be black or white. While in color images, each pixel has color.
Which can be described as follows:
So the raster image is stored as a matrix. The bigger the image, the bigger the matrix grid. It makes more data is stored and the file size getting bigger. So the 18-megapixel image is obviously bigger than 5-megapixel. Because the dimensions are different. We’ll talk about it further later.
Vector
In vector, images are defined in an information data format. For example, an image of a triangle contains information of triangle object such as:
- coordinates of each point that forms a triangle
- line information, i.e. color, thickness, type (solid line, dash, or dots)
- triangle color (solid color or gradation color)
If there is a circle next to a triangle, then the data of the second object containing information of coordinates of the center of the circle, as well as diameter, line type, and color.
So that’s a vector image. Geometric forms, shapes, points, curves, can be arranged into complex shapes.
The vector format is very easy to edit. For example, a designer who draws a logo can easily change the color of a particular part, change the shape, bend the lines, etc. And with these characteristics, vector format is suitable for non-realistic / non-photographic images. Such as logos, layouts, illustrations, infographics, maps, cartoons, etc.
Like this.
Vector format can also create realistic images, but with a set of complex shapes.
If using a vector, the designer doesn’t have to worry about the image size. Designers can enlarge images to any size without losing quality because it does not contain data of color per pixel, but data of lines, curves, or shapes.
Another example of a common vector application is font. Modern fonts on a computer base on vector data. So if you type in Microsoft Word using Arial font, the font size can be changed as you wish without losing quality.
So for vector images, if you wish to print it on small business cards, A4 size, or even gigantic size of banner, the images or text will still be sharp & smooth.
For more details see the explanation below.
The difference between raster & vector when zooming
When you zoom in the same size of vector and raster image, it looks different. In the raster image, you will see the squares of the pixel. But in the vector image, it will not lose the quality at all. It’s still as smooth.
In raster, you will see pixel squares.
While in vector, the image is still smooth and sharp.
So from the definition of raster and vector above, we can conclude that raster is suitable for complicated detailed images such as photos or paintings, while vectors are suitable for logos, icons, illustrations, that are arranged from shapes. The most obvious difference is when the image is being enlarged.
Note: When the raster is enlarged, you don’t always have the jaggy square effect like the example above. It is because modern software often re-renders the image by applying a smoothing filter, in order to try to maintain its smoothness. The results are like a blurry effect. It is still not nice and not ideal. For example, it is in a web browser like Firefox. If there is a picture this small:
When we zoom it in extremely beyond the original size, there will be a smoothing effect. This is not the original image, but Firefox that renders it in such a way. See the image below.
If there’s no smoothing, it will appear like the image below.
But sometimes, due to some artistic reason, intentionally designers looked for that square effects. For example in pixel art, to display the impression of retro or old school.
Raster file size
As discussed earlier, the size of the raster file will increase along with the growth of the image size. Let’s make a rough calculation. If an image is stored in a certain raster format. In the colored image, each pixel dot is formed from a combination of 3 basic colors: R (red), G (green), and B (blue). If each color element is 8bit in size, 1 color element can include 256 possibilities or variations.
This is similar to display technology. Each pixel on the screen consists of 3 lights: R, G, and B. Value 0 means light off, value 255 means light fully on. For example a pixel is R = 255, G = 0, B = 0. It makes red LED lights turn fully on, while the green and blue lights are off, which will produce a red color. In R = 255, G = 128, B = 128 makes the red light is fully on, and the green and blue lights are 50% on, so it will produce a pink color.
In example below, the light orange is a combination of R = 251, G = 176 and B = 59.
So how many is the total color variation that can be generated from the calculation above?
The answer is : 256 x 256 x 256 = 16.78 million colors. That’s the amount of different colors each pixel can have.
File size of a raster image
A pixel is an RGB data, which is 8bit each. Then 1 pixel = 8bit × 3 = 24bit = 3 bytes. If there’s an 18-megapixel photo, it shows that there are 18 million pixels. When you open it, it turns out the image size is 5184 x 3456. So technically 17.9 megapixels, round the number up to 18 (rounding like this is common, including storage size like flash disk, HDD, etc). Then multiplied by 3bytes per pixel = 53.7 megabytes! Wow, for one photo, do you need that much? Yup if it is stored according to the rough formula above. It should be even bigger because there is additional data or metadata.
Isn’t the photo file size not that big?
That’s right, it’s usually much smaller. Because there is such a thing called compression technology. Usually, the image is saved in a compressed format.
So the formula above applies to an image without compression. One type of popular format that approaches the theory as above is BMP. An old school format that is common since the earliest Windows. This format is simple and stores data in a raw state.
Modern formats usually use compression. So, of course, the size is smaller. The most common modern format is JPG or JPEG. Where a 5184 x 3456px image can be stored in 2MB. Thanks to sophisticated algorithms that reduce data information and image quality, but invisible to the human eye. Maybe next time we will discuss a special article about image compression, so stay tuned.
Although raster can also be stored in small sizes, but in the world of design, where designers have to edit images, then the raw/source file must be without (or minimal) compression. Why? Because the source file must contain the highest quality data. So even if compression exists, the type of compression used must not reduce the quality and information of the data (called by lossless compression type).
Because of this file type size, computer resources that are required to edit images must also be qualified. For example in Photoshop, the source image format used is PSD (stands for “Photoshop Document”). This PSD file can contain many layers of image, so the file size can be even larger than a single image.
In Photoshop, you can check the file size in the bottom left corner. The left one (57.1MB) is the estimated file size if the layer is single. And the right (138.6MB) is the estimated file size of the current document, which includes all layers and channels.
Vector file size
Because of its resolution-independent characteristic (or does not depend on its dimensions) then a vector file size is still the same (or slightly different) even though the image is enlarged multiple times. For example, an image of 100x100px size can be enlarged to 200x200px.
It’s logical because what changed is only dimensions and coordinates. Even when you zoom it in, it just re-rendering using a new scale.
The software
Common raster software is software for processing photos, such as Adobe Photoshop, Corel Photopaint, Affinity Photo, Gimp, Lightroom, etc. And those that focus on digital painting such as Corel Painter, Krita, etc.
While the vector softwares are Corel Draw, Adobe Illustrator, and Inkscape.
That’s an example of each software that has the main focus on rasters and vectors. Why do I say the main focus? Because nowadays, those boundaries are increasingly blurred. The software’s capabilities are a bit overlapping, for example Photoshop also has vector editing facilities.
In another article, I will talk about using that software. Also about free program recommendations. Stay tuned for the next one.