Vector vs Raster Graphics: What's the Difference?
Almost every confusing thing about image files traces back to one distinction: whether the file stores instructions for drawing a picture, or a record of the finished pixels. That single difference explains why an EPS logo stays razor-sharp on a billboard while a PNG of the same logo falls apart when you enlarge it.
The short version
A vector file is a recipe. It says: draw a circle here with this radius, fill it with this blue, put this curve beside it. Nothing about size is fixed, so the recipe can be followed at any scale.
A raster file is a photograph of the finished cake. It records the colour of every pixel in a fixed grid. You can shrink it, but you cannot enlarge it, because the detail was never captured.
What is a vector graphic?
A vector image stores artwork as mathematics — anchor points, Bézier curves, strokes and fills. Rendering software solves that maths for whatever size you ask for, so the output is calculated fresh at your screen's or printer's full resolution every time.
EPS, SVG, AI and PDF are the common vector formats. They are the correct choice for logos, icons, typography, diagrams and line art — anything made of defined shapes and flat colour.
What is a raster graphic?
A raster (bitmap) image is a fixed grid of coloured pixels. A 1000×1000 PNG holds exactly one million colour values, and that is the entire picture. This captures subtle gradation beautifully, which is why every photograph is raster — no reasonable set of curves could describe a human face.
PNG, JPG, GIF and WebP are the common raster formats. They are right for photographs and anything with organic, continuously varying detail.
Side-by-side comparison
| Vector | Raster | |
|---|---|---|
| Made of | Mathematical paths | A grid of pixels |
| Scaling up | Infinite and lossless | Blurs or goes blocky |
| Has a resolution? | No | Yes, fixed at creation |
| File size driven by | Artwork complexity | Pixel dimensions |
| Editable afterwards? | Every shape, individually | Only the pixels |
| Handles photographs | Poorly | Excellently |
| Examples | EPS, SVG, AI, PDF | PNG, JPG, GIF, WebP |
File size behaves in opposite ways
This surprises people, and it follows directly from how each format works.
Vector size depends on complexity, not dimensions. A simple two-colour logo might be 15 KB whether it is printed on a stamp or a building — the instructions are identical. But a detailed map with a hundred thousand paths can become enormous, and slow to render.
Raster size depends on dimensions, not complexity. A plain white 4000×4000 image still has sixteen million pixels to account for. Doubling the width and height roughly quadruples the pixel count.
The practical consequence: for a simple logo, vector is almost always both sharper and smaller. For a photograph, vector is not an option at all.
How DPI actually works
DPI (dots per inch) is a common source of confusion, because vector files do not have a DPI. Resolution only comes into existence when the artwork is rendered to pixels.
The arithmetic is straightforward: pixels needed = physical size in inches × DPI. A 4-inch-wide graphic at 300 DPI needs 1200 pixels. The same graphic on screen at 96 DPI needs about 384.
So when you export an EPS to PNG, you are choosing a DPI whether you realise it or not. Rules of thumb: 300 DPI for print, 96 DPI for screen, 150 DPI for something being viewed at arm's length. Large banners are often produced at far lower DPI because nobody stands two feet from a billboard.
Converting is a one-way street
Vector to raster is easy. Rasterizing just means running the instructions and recording the result. Every conversion tool does this.
Raster to vector is genuinely hard. Going backwards means looking at pixels and guessing what shapes produced them — a problem with no correct answer. Auto-tracing tools (Illustrator's Image Trace, Inkscape's Trace Bitmap) do a decent job on high-contrast, flat-colour images such as a black silhouette. They do poorly on photographs, soft gradients, small text and anything with anti-aliased edges, producing hundreds of ragged paths that only approximate the original.
This is exactly why designers insist on keeping the source file. Once a logo exists only as a 500-pixel PNG, getting a print-quality version usually means redrawing it from scratch.
Choosing in practice
- Logo or icon: vector always. Keep an EPS, AI or SVG master, and export rasters as needed.
- Photograph: raster always. JPG for photos, PNG when you need transparency or perfectly crisp edges.
- Logo on a website: SVG if you can — it is small, sharp on every display, and stylable with CSS. Otherwise a PNG at twice the display size for high-density screens.
- Anything going to print: vector, or a raster at 300 DPI at final size.
- Large-format banner or vehicle wrap: vector, without exception.
- Screenshot or UI mockup: raster — PNG, since JPG smears text.
Common mistakes
- Enlarging a small raster and hoping. Upscaling invents pixels; it cannot recover detail that was never recorded.
- Treating a PNG as a master copy. Always archive the vector.
- Assuming a vector file is safe from rasterization. An EPS can contain an embedded photograph, in which case that part is still pixel-limited.
- Sending a printer a 72-DPI web image. At 300 DPI it will print at roughly a quarter of the size you expect.
- Using JPG for line art. JPG compression is built for photographs and leaves visible halos around hard edges.
Frequently asked questions
- Can you convert raster back to vector?
- Only by tracing, automatically or by hand, which approximates the shapes rather than recovering them. It works acceptably for simple high-contrast images and badly for photographs.
- Is EPS vector or raster?
- Primarily vector, but EPS can embed raster images inside it. A pure-vector EPS scales infinitely; one containing a photograph is limited by that photograph's resolution.
- Is PDF vector or raster?
- Either, or both. PDF is a container: it may hold vector artwork, embedded photographs, or a scanned page that is entirely pixels.
- Why does my logo look blurry on a retina screen?
- You are serving a raster image at the same pixel size as a standard display, and the screen is showing it at roughly double density. Use SVG, or export the PNG at 2× the display size.
- Does a vector file have a DPI?
- No. Resolution only exists once the file is rendered to pixels. Any DPI setting you see in an export dialog describes the output you are about to create.
- Which is better?
- Neither — they solve different problems. Use vector for designed artwork made of shapes, raster for captured images of the real world.
Need to open an EPS right now?
Use the free EPS Viewer — preview your file and download it as a PNG in seconds.