# Why are raster images still used when vector images have so many advantages?

I have read some posts and see many advantages of using vector images when compared to raster images:

1. They can be zoomed or scaled at any ratio.
2. File-size efficiency. Because vector image only identified by mathematical descriptions rather than for each pixel.
3. It can be used for designing logos or magazines, because you can export to any size.

I also searched and see that you can convert raster images to vector images with some tools. So my question is: With all the above advantages of vector images, why some photo manipulation softwares such as Photoshop still use raster images?

Why don't we convert to vector image before doing something. And just convert back to raster image when we need export to some format such as bmp, jpeg ... when necessary.

• Ever seen a photograph with many shades? That's very hard to vectorize and file size probably will not decrease. You actually can vectorize a photograph, though the result will be disappointing. In that way, you cannot. Commented Dec 21, 2014 at 18:51
• we do use vector graphics to make our life easier in drawings, after all we use vectors to convert it into raster images as an end flatten product. Commented Dec 21, 2014 at 19:02
• @hsawires yes. I agree with you that we will convert to raster image for flatten product if we use vector image. But at drawing state, still many software and many people use raster image (they can convert to vector image or they can use another vector software but they dont) this point makes me dont understand. Thanks :)
– hqt
Commented Dec 21, 2014 at 19:10
• It's kind of like asking why we have both oil paintings and ink drawings. Different media for different reasons.
– DA01
Commented Dec 22, 2014 at 0:52

You can do a lot of things with vector graphics, eventually however the vector graphics need to be rendered to pixels, rasters etc. This rendering process gets slower the more data you have. In fact 3D graphics is also a vector graphic data. 3d renders show the limitations of your rendering speed as many renders to print size take hours to do.

Image 1: 3D graphics are sort of vector images, rasterization is often slow and needs special tools.

Second, most sensors allow you only to do pixel based captures, since sampling is discrete. In practice discretisation has many benefits in the computational realm. Many processes get much easier to do when you have discrete data samples. So things like blur, can be computationally expensive for the vector engine. Again though this is not a limiting factor just a practical factor.

Third, pixel manipulation is MUCH easier to understand, as it approximates much better how real world mediums work. So combined with easier discrete effects its often much more practical than vectorizing your medium.

In fact there is a really fuzzy division between raster and vector and often you intermix the methods so that its hard to say whats vector and what is not. For example liquify is sort of a vector effect on the pixel based data.

TL;DR; So you use pixel graphics because its easier, faster and more understandable. It does the job.

• thanks for your updated image :D Will vector engine render slower for bigger image (with same content) ? Thanks :)
– hqt
Commented Dec 23, 2014 at 15:33
• @hgt Yes, but a but it depends on technique how much slower. In general the work increases atleast linearly with amount of pixels. Since pixels increase by square of resolution thats a lot. Commented Dec 23, 2014 at 16:45

While vector images have many advantages, they also have shortcomings.

Vector data is, in general, better suited for items which have hard edges. Vector graphics do not excel at creating soft edges areas or shapes which blend into other soft-edged shapes.

Yes, you can use raster effects in many graphics applications to blur or "undefine" the edges of something. However, doing this ultimately creates embedded raster images. Within many vector apps raster interpolation and scaling is not something which happens or if it does, it doesn't happen with excellent results.

While software has advanced a great deal, there are really many things which can not effectively be accomplished in vector images. While it is true you can "trace" most raster images to convert them to vector, many of these tracing are less than optimal if the subject matter in one which contains things like blurry or soft focus areas.

Subject matter is a huge factor. If an image already has hard edges then there's no reason to not use a vector version. But soft-focus raster images will never trace well. Realize for logos, drawings, etc. vector data may be perfect. However, for portraits, hazy landscapes, etc. vector data would be insufficient.

Ultimately it all comes down to desired appearance. If you're fine tracing everything and ultimately losing soft focus edges in photographs, then more power to you. However, almost every tracing carries with it a clear indicator that the image is not smooth across the board. I defy you to show me a tracing of a soft-focus raster image which exactly mimics its original. There's always some give and take.

Think of the difference between a GIF and a JPG - there are simply some things which don't work well in the GIF format. Same holds true for vector images -- there are simply some things which do not work well and it makes little sense to force an image into an undesirable format when the end results won't ever be equal to the original.

I love vectors and use them as much as possible. But I also know you can't throw out the baby with the bathwater. Raster images have their advantages and will most likely never fully be abandoned.

Photographs and pixel-based art can have a real-world fidelity that vector artwork can not easily achieve. In real life, things are not really mathematically precise and clean. One can get greater photo-realism per file-size bit with pixels than with a vector shape. That's not to say you can't achieve near photo-realism with vectors - rather that you'll likely find it easier to accomplish said photo-realism through pixels than mathematically defined shapes and fills.

If you're really getting photo-realistic, you'll basically be recreating the pixels with vector shapes - at which point you might as well have used pixels anyway.

• Vector "realism" can be improved with dejaggied algorithms for drawing lines and edges, qv. Commented Dec 21, 2014 at 23:07

Because some things almost cannot be vectorised. So, in the world of sound almost the same question can be asked: "Why we are still using wave files when MIDI has so many advantages". Yes, MIDI files can be stretched or transposed in any ratio, and file size is hundreds of times smaller. And also, they can be exported in any quality using different samples. But unfortunately, some non-musical sounds are hardly to describe in the language of MIDI.

• Even before computers, some of the same principles applied to metalworking. If an object is conceived as being a combination of primitive shapes with certain characteristics, it may be best to use a dimensioned drawing as the basis for fabrication, but if the design is fashioned by forming something until it achieved a desired aesthetic, it may be better to make an "analog" mold than to try to formulate a combination of primitive shapes that could be used to describe the object. Commented Dec 22, 2014 at 18:24

If an image can be produced using a sequence of automated operations which don't take too long to execute, the best way of "describing" the image will often be to describe the operations used to produce it. Not only will such a the description often be relatively concise compared with other representations, but in many cases it will be possible to make certain kinds of useful changes to the rendered image (e.g. scaling, rotation, etc.) by applying systematic changes the operations in question.

Many images, however, cannot really be described in such a fashion. If a camera is used to photograph a scene, there may be no practical way to formulate a description which could be used to automatically duplicate the scene in question, other than by having the camera report, essentially, that a reasonably-good approximation of the scene in question may be achieved by filling in a bunch of pixels with specified values. Such an approximation would not be amenable to all the changes that could be done by a photographer working with the actual scene [e.g. a photographer could easily ask someone to move slightly so as to avoid obscuring something, but someone working with the pixel data could not], but for some other kinds of effects the process of taking the pixel representation, manipulating it, and rendering the result could be automated, whereas effect which required manipulating the physical subjects and rephotographing them generally could not.