Overview: Tipps, Tricks und Tutorials at Vektorgarten (German)

How to set up a graphic file: vector or raster, resolution, color mode and which file format to choose?

There are some questions people ask again and again in public forums, Facebook groups or elsewhere. When setting up a file you can ruin your project if you do it wrong. So you should spend some time and learn about production, color, vector and raster images, resolution and of course which file type to select, because of course you want all your hard work to not only still be there tomorrow but also to stay editable and to look gorgeous when printed.

The following is an introduction. I have tried to sum up the answers to questions people have asked. I hope this is helpful to you.

Vector or raster?

While raster files consists of rows and columns of colored squares that together form the image, in vector files shapes are built by paths - mathematical functions - that have fills and strokes. 

What is the difference?

The most obvious difference is that you can calculate with paths, most importantly enlarge them - theoretically - to infinity. But vector work has another advantage which is the object oriented approach to graphic design. All shapes are single objects and stay so until you deliberately join them with other objects. Their fills and strokes are just attributes that can be changed easily at any point. This allows you to not only scale or otherwise transform the complete graphic, but also any single part of it.

Figure 1: Select any single part and enlarge it or recolor it. Adjust the stroke weight after scaling as needed or choose to not scale the stroke weight in Preferences.

On the other hand scaling of a graphic is not as free as might seem, because downscaling is limited by the smallest size the output device is capable of displaying or because of technical issues that arise from tiny detail.

Figure 2: When lines get too thin, the foil detaches easily from the fabric.

Which apps to create those

Raster editing applications like Photoshop, GIMP, Affinity Photo and many many more create raster files as their native file types. Some of those editors possess the relevant tools to create vector content as part of their files and some can also export this as vector files. Vector editing applications such as Illustrator, Corel Draw, Inkscape, Affinity Designer as well as some others create vector files as their native file type. You can also import raster files into these documents or apply effects that create raster content or convert vector paths into raster images. On top of that they can convert and output this content to raster files.

So most of the files created by these apps can contain bot vector and raster content. It completely depends on the way you create and edit the artwork inside the application.

Figure 3: When applying raster based effects such as the Gaussian blur to the scarf in this graphic, you create raster content in the output file. The figure shows a screenshot from an EPS. The part is not only rasterized, it also needed to be stitched, that is puzzled together from multiple elements.

This also means that just by opening or importing some content into a vector app doesn't make it into a vector file. Or precisely: just by opening that small GIF inside Ilustrator you don't make it infinitely scalable.

But the following is also true: production can get really complex. There are a couple of techniques that demand not only a vector file, but its content needs to meet specific criteria. Not every pure vector function that you can use in a vector application will create content that is suitable for plotting or laser engraving or using as base artwork for a font or 3D.

So when creating something for someone you not only need to know which file format to deliver, but also what exactly can or needs to be there.

When creating a logo, you will most certainly sooner or later need a vector file. In case you also want to use effects on it, make an "extended" version, but have a simple one as well that works in black and white.

RGB or CMYK?

Let's get this straight: in today's software you either setup and use color management or it will ruin your day. There's no way around it. In case you haven't done so already you need to learn color management. Now. 

When setting up a file the decision for a color space depends on some variables. The theory of color management is to work independently from the output medium in RGB color space and then do the conversion in the PDF you create for whatever is needed by setting up the options and profiles. This works great for photos and most other raster images. It doesn't work for vector artwork, because when applying a conversion through ICC color profiles black gets colored and other colors might get tinted with small parts of cyan or magenta or black which makes them muddy. 

Figure 4: Conversion of RGB black to CMYK - with this color definition you will most likely get in trouble when printing.

Figure 5: After converting to CMYK there's a considerable amount of cyan in the yellow shape

But there's another important point and that is blending modes. In case you plan to use more than multiply to create the effects you need, you will be surprised in CMYK mode, because blending modes won't work as expected. 

Figure 6: Original RGB AI file with live objects and transparency (left); converted to CMYK (right)

Overprinting and spot colors on the other hand will not work as expected in RGB mode.

So when setting up your file the question is not only if this going to print or on the web.  Setting up files for screen or web design requires them in RGB, but for print design it depends. When working with raster images in most cases RGB makes sense for printing as well, because it's the larger color space and thus will allow more and better editing. And it allows more flexibility should you need to prepare for different printing processes later. 

When setting up vector artwork the additional question is what kind of artwork it is and which kinds of editing you are planning to do. Infographics with their sharp, than black lines and tiny typography or logos with an exact color definition often require a different approach than painterly illustrations with lots of blending modes and/or transparency where exact color defintions and thin, exact lines just don't exist.

A logo usually is set up in CMYK initially. The reason for this is that since you want consistent color, you will have to design it for the smallest color space. Logos usually will get printed sooner or later. You need to later convert a version to RGB and adjust the colors for use on screen.

Figure 7: A generic CMYK color space inside the Adobe RGB color space

When setting up new files in Illustrator you need to select the color mode via the new document profiles. Otherwise you will have some extra work to do adjusting all the default swatches.

Figure 8: Selecting the color mode for a new file in Illustrator.

Browsers as well as many simple image file viewers often can't display CMYK or won't do proper color conversions so you should only use RGB files on the web. On top of that RGB files are smaller than CMYK files. When saving files via the Save for web function in Illustrator or Photoshop, files are converted to RGB automatically. Also some file types can only be RGB (such as SVG or PNG). 

Which Resolution?

This is often reduced to "how many dpi do you want the image"? First of all, it's called ppi. An image file has a number of pixels per inch. But to determine if the image resolution is high enough, the ppi is completely irrelevant. Let's look at an example. A photo taken by a smartphone has 72 or maybe 180 ppi, but nevertheless Apple prints billboards with them. They can do this because there are plenty of pixels in those images. Pixels carry the information in a raster image. One pixel can have one color and so pixels are the building blocks, the smallest possible element in an image. The more pixels there are, the more detail is there. 

Figure 9: The same image with fewer (left) and more (right) pixels. The amount of detail that can be displayed depends on the number of pixels in the file.

The ppi only define how many pixels you want to cram into an inch. The more ppi, the smaller any pixel will get. For each output method or device you need a specific amount of pixels per inch (referring to the image size in your final layout) in order to get a decent result. If you want to change image resolution open the Image size dialog. This is in Photoshop, other applications have a corresponding function.

Figure 10: Different image resolution, but pixel dimensions don't change (this is achieved by unchecking the resampling option). With a lower resolution (bottom) the output dimension is larger.

When changing the resolution, the image gets scaled. This also happens vice versa: when you scale an image in your layout, the resolution - called the effective resolution - changes. Reducing size is usually not an issue, but when you plan to enlarge them, the pixels get larger and at some point will be so big that you can see them in print. To prevent this, image editing software would need to do resampling, that is the software would need to magically invent pixels where there weren't any by interpolating neighbouring ones. This creates more pixels by inch. Google has lately shown some impressive examples of how to do it with faces, but existing desktop software can't do it properly for every image type.

Figure 11: Enlarging the image on the left using different algorithms in Photoshop. But there's no way to re-create the details that can be seen on the right, because interpolation relies on what is in the image and create in-between pixels by interpolating.

For web browsers the ppi of an image is completely irrelevant. They display pixel dimensions. Usually they match one image pixel to one device pixel unless the HTML code tells them a different image size to display. Just applying 72 ppi to your print file also does not magically make it low file size and low quality and thus protects it from being pirated. Instead you need to reduce its pixel dimensions to whatever is appropriate and fits your layout.

Figure 12: This is a 4x4 pixel image @ 30,000 ppi (which is the highest resolution you can set up in Photoshop). In the HTML code of this page I have set it up to be displayed at 400x100 pixels. Does this make any sense? Not at all. It just shows you that the ppi setting is completely irrelevant for the quality of the image and that the browser ignores both the pixel dimensions and the ppi.

Your service partner can tell you the ppi they need. You will then need to examine the pixel dimensions of your images in order to find out the maximum size you can use them in your brochure or poster or web site.

Setting up new images

When creating a new raster image file for your illustration, you need to know the size it will be printed and the resolution needed for the printing process (which is always related to the physical size, so 300 ppi means effective resolution based on the size of the image in the layout). For a high quality art museum catalog you need a higher resolution than for a newspaper ad. For a large format billboard you need a very low resolution. In case there are several use cases for the artwork you need to calculate which one demands for the largest pixel dimensions. Create your image in the largest size - if possible set it up slightly larger, so that you can later do some adjustments (like levels, curves, transformations or whatever you need to do).

The same goes for scanning images. Always scan them larger than needed, because after editing the scan (eliminating dust and scratches, levels, curves etc.) scaling down helps to further improve the scan.

Vector files and resolution

A vector file doesn't have a resolution. Instead you are working with absolute measurements in millimetres or inches or whatever the software has to offer. The displaying software will then always render the artwork at the given zoom level in the best possible quality. For the rendering of raster based effects such as drop shadows you can apply in many vector apps, you set the resolution. This resolution can be changed inside the app at any time and the effects can be scaled inside the app, but when the file is used somewhere else, or printed, this resolution is fixed. In the case of Illustrator this is the ppi value you set when creating a new file.

When exporting a vector file to a raster format you also need to set a resolution. Usually the software will apply this resolution at the absolute measurements you used to design the artwork. In Illustrator when you designed your artwork using pixels as a unit and scaled everything to specific pixel sizes, you will need to export the artwork at 72 ppi to the raster format when you want to keep the pixel size you specified.

Outline fonts?

Usually you won't need to do outline fonts when sending your artwork for printing. Outlining all text causes type to look differently (worse) and - when done wrong - causes some of the text to vanish completely (such as numbering or specific formatting).

When you're asked to outline fonts, ask why. Don't accept "we've always done it that way" as a reason. Usually service providers ask you to do this because they don't use Acrobat for printing, but will open your PDF in CorelDraw or the like. Besides the font issues this might have some other impact on your artwork as well.

When delivering a PDF you can embed the fonts. The receiving party does not need the fonts for viewing and printing or for placing the file in a layout.

When creating a PDF to upload to a website, you shouldn't even consider to outline fonts. With live text your document is far more accessible to people with alternative access technology such as screen readers for the vision impaired.

In case you absolutely need to outline fonts, don't use the obvious outlining option in the Text resp Type menu of your software (at least don't use it for long passages of text). Instead do either flatten transparency or use Acrobat to outline fonts.

Text should always be outlined in logo files you send to clients or third party and in files sent for plotting. When you plan to further edit files in other applications, such as 3D apps, you might need to do some testing whether to outline or not.

When creating files for CAD, you usually use a special kind of center line fonts. Those should not be outlined.

Work file or exchange format?

When saving files you need to differentiate btween work files and output files - while the work file is the one you use for editing, the output files is only used for production purposes. It's sent to the printer or put onto the web site. Only in rare cases you can use one file for both purposes.

While you want your work file to be fully editable, this is for several reasons not desirable for the output file: file size needs to be as small as possible, color modes might need to be different and of course you don't want everyone to be able to edit your file.

Full editability in raster images is achieved by keeping everything on layers and by using adjustment layers for color correction, smart objects, live effects and so on. In vector files layers aren't that important for editability, but of course for efficiency. On top of that you have live type, strokes, brushes, live effects and live transparency.

Full editability can only be achieved by saving native files. If you don't know the native file format of your application, look that up in the documentation. Usually it's in the "Save as" function, but there may be more than one format in the list. Look for the one that has the application's name in it. In Illustrator the only native file format is AI. All the other formats in the list may not be native if you select the wrong options. So make sure you save a native file or you will ruin your day.

In production files layers are usually flattened. Most output formats don't support layers, live transparency, live effects or any native objects an application might provide. By flattening layers you can also keep people from doing too many edits in your raster files. Vector files cannot be saved in a way that you can't edit objects. You can only make it more difficult and you can keep inexperienced people out by obscuring things in groups or clipping masks.

Although the PDF options pretend that the file can be password secured, this is not a protection at all. Firstly you should not use it when sending files to your print service provider. Secondly the protection can be hacked by anyone who is able to do a Google search.

A closer look at filetypes

In this section I'll cover different filetypes as to their integration in the workflow and how to use them in the workflow. I won't cover every technical detail or setting. Please use your application's manual to learn that.

JPEG

A JPEG (Joint Photographic Experts Group) is a raster based file type. The long version of that abbreviation already tells you what content this format has been made for: photos. It has been developed to effectively compress images and it does so by applying a lossy compression. The more you reduce file size the more likely it is that you see the artifacts. Graphical content such as logos are more likely to suffer from compression and compression is more visible in red colored areas of an image, because JPEG treats colors differently. It works based on human perception and applies compression according to what is more important in images (such as skin color) and what is less likely to be noticed.

Figure 13: Highly compressed JPEG; there are lots of artifacts, but in the red portions of the image the artifacts are more obvious.

Mind that several websites, such as Facebook and other social media sites apply further compression to several files, not only JPEGs. So you might not have full control over image quality on those web sites.

https://en.wikipedia.org/wiki/JPEG
http://www.robertstocker.co.uk/jpeg/jpeg_new_6.htm

Saving files in Photoshop: https://helpx.adobe.com/photoshop/using/saving-files-graphics-formats.html

Export options in Illustrator: https://helpx.adobe.com/illustrator/using/exporting-artwork.html

GIF

GIF is one of the oldest file formats on the internet. It has been developed for CompuServe in 1987. GIF supports a color table of up to 256 colors and is best suited for flat, graphical images such as logos or infographics. GIF also supports look-through (by defining certain pixels as invisible) and animation. It's a very versatile file format, but it can't display photos and multi-colored gradients too well and it had been protected by patents for about 30 years, which kept people from using it and looking to develop alternatives. With the advent of Cinemagraphs GIF experienced a revival.

Figure 14: A GIF may contain animation.

GIF compression is lossless, but it reduces the number of colors thus of course losing information.

GIF might still be a good choice for saving logos and graphics that have a limited set of colors, because in a GIF you won't have compression artifacts like in JPEGs and GIFs might still be smaller than PNGs. When there is the need for alpha transparency, e.g. to put a drop shadow onto backgrounds of any color, PNG is the better choice.

The format is not suitable for printing.

https://en.wikipedia.org/wiki/GIF

SVG

SVG is a vector based file format that can also contain raster images. You can add styling via CSS and interactivity via JavaScript. Live effects can be coded as well. SVG is an open standard based on XML and is used for vector files in the Wikipedia. A couple of applications can read and write SVG files, while some are better at it (Illustrator has issues with both reading and writing SVG, especially with clip groups).

SVG is often used in mobile apps and on a couple of web pages. You still can't use it on most social media sites. If you plan to use it in your web site or web based app, check browser support here: http://caniuse.com/#feat=svg

Some compression in SVG is achieved by reducing the number of decimal places and by reducing formatting in the code (returns, spaces, etc.). You have to create objects efficiently by using a small number of anchor points in order to further reduce file size.

SVG is Inkscape's native file format. In Illustrator you can also use it that way, but since Illustrator achieves this by storing the complete file in a private data fork, it's not advisable to use SVG for roundtripping with Illustrator. Once you edited an SVG file in a different application, e.g. to add interaction or animation or to optimize the SVG, you shouldn't reopen it in Illustrator or you risk losing at least parts of your data and for sure you will lose whatever has been edited in a third party application.

When exporting/saving an SVG a couple of options exist to incorporate styles and code text/fonts. You will need to discuss all these with the web developer in order to deliver a usable file. Don't just save an SVG without exact instruction on how to set the options. It's professional behaviour to ask questions about all these.

The format is not (yet) really suitable for printing although some users are experimenting with it inside web-to-print-applications. CMYK support is achieved via work-arounds and is only available with helper applications.

https://www.w3.org/TR/SVG11/
https://en.wikipedia.org/wiki/Scalable_Vector_Graphics
https://sarasoueidan.com/blog/svg-tips-for-designers/
http://blogs.adobe.com/webplatform/2013/07/30/exporting-svg-from-adobe-illustrator-cc/

PNG

PNG has been invented as an open standard to replace GIF, which had been limited by copyright issues and which could not support some features that would have been useful. There are different flavours of PNG and a plethora of options. Not every application fully supports all the options, so you might run into issues with some PNGs. In case you can't open it in one app, try a different one, e.g. Photoshop supports more options than Illustrator.

PNG files are raster files, that is, unless they have been created by Adobe Fireworks. PNG was Fireworks' native file format. Fireworks added a private data part to the file to store its native information, which could also be paths (among other stuff such as layers, animation, interaction etc.). But this vector information can only be stored and only be accessed by Fireworks. No other vector app will save PNGs with private vector content or can access vector information that might be stored in them.

PNG 24 supports full color and alpha transparency while PNG 8 supports 256 colors (like GIF does). Some flavours of PNG 8 might contain alpha transprency, others just render specific colors as invisible. In Illustrator you might creeate different types of PNGs depending on whether you export through Save for web or Export for screens.

The format is not suitable for printing.

https://www.w3.org/TR/PNG/

TIF

TIF is a raster format supported by all layout, raster editing and vector apps, but not all of them might support all the options the format has to offer. It's a trusted work horse of the printing industry. TIF uses a lossless file compression algorithm that can make files considerably smaller. In recent years inside Creative Cloud apps it has been replaced by the PSD format.

The format is not suitable for the web, since it's not supported by most browsers.

https://en.wikipedia.org/wiki/TIFF

PDF

PDF serves a couple of purposes. It has been invented so that content could be viewed on any device while keeping its exact layout, colors, fonts etc. Another purpose was that any application could create PDFs. In the early days this was achieved via printing PDFs and distilling them with Acrobat Distiller (in Adobe applications printing PDFs is considered bad practice nowadays). In the meantime most applications can save or export PDFs. PDFs can contain vector as well as raster content.
PDF has been invented by Adobe, but has since been standardized and thus is not "owned" by Adobe alone anymore. Other institutions and organizations have an influence on what happens with the format.

PDF can contain a variety of content types: raster and vector content, audio and video, 3D, forms and when creating PDF for view on screen, you can incorporate interactive elements. PDF can be created in a way that it conforms with accessibility legislation. But all this cannot be created by every application that just exports to PDF.

PDF is also the common format when delivering artwork for print. Fonts can be embedded and it supports ICC colormanagement as well as transparency.

Although many graphic design apps are able to open and interpret PDF files in a way that they can be edited, this should be an exception, since the content is not meant for editing and the original structure of the content gets lost when saving to PDF.

When saving print PDFs, you will often need to flatten transparency. In order to set appropriate options, you will need to understand the basics of transparency. In case you haven't done so already, please read this now: https://de.scribd.com/document/55915691/A-Designer-s-Guide-to-Transparency-for-Print-Output-Adobe

Information about Accessibility: http://www.pdf-accessibility.com/

EPS

EPS is last century's work horse file format for print production. In some circumstances it is still relevant today, but some people only still rely on it because "it has always been that way".

Often someone will ask you for an EPS when actually they mean vector content. EPS is not necessarily vector content. An EPS can contain both, which also means when you just ask for an EPS you might even not get a vector file at all. EPS used to be *the* file format to deliver raster images that were to placed in layout apps some 25 years ago. When someone asks you for EPS ask them for the details. When you yourself need vector files, make that very clear and when you get an EPS file, don't take it for granted that it's a vector file.

All stock image companies rely on EPS for their vector content. Since it's a rather old format, it doesn't support new features of publishing apps ("new" in this case being everything younger than 20 years). Since anyone can upload EPS files generated by any application that supports EPS, content might be built in rather unusual way and might or might not be fully editable in the application that you happen to use. Again: when using Illustrator, it sneaks its native content into the private data part of that file and you are actually not using the EPS at all, but an AI file.

Some stuff can't be achieved with EPS, most importantly transparency. Drop shadows and other transparent stuff will always have a white rectangle behind them. Also you can't have ICC color profiles in EPS files.

Figure 15: Transparency will always be flattened in an EPS which causes the white box below a shadow.

Don't use EPS inside Creative Cloud workflows, as support for the format drops a little with each version. Use native files (AI, PSD) instead. When creating artwork for other workflows, always ask yourself and others if there are better alternatives to reach your goal.

EPS - the Zombie among file formats

AI

AI is Illustrator's native file format. In its current versions only Illustrator can save or open it. Older versions such as AI3 or AI8 can be opened by other applications as well (read more about legacy AI files here).

Usually you only use it as a workfile, but through a clever mechanism AI can be used inside the Creative Cloud apps for placing Illustrator content into other applications. This is achieved by embedding a PDF as private data into the AI file. Using this workflow you can use only one file for both placing into the layout as well as for editing the graphics.

Some other applications use this embedded PDF to access the content of current AI files as well. They pretend to open AI files, but actually they open PDFs.

The AI file format usually is not handed to clients - most can't edit it anyway. It's not an exchange format, it's a work file. Logos are an exception - the license you usually sell covers a wide range of use cases and that's why clients will need file formats that cover these use cases.

Mysterious things Illustrator does - Saving files from Monika Gause on Vimeo.

See my other English tutorials:

Saving safely
Saving legacy files
Long Shadows with Illustrator
Creating a pentagonal pattern
Proposals for better better workflow in Illustrator
3D-Animation
Freeform-artbrush with a gradient
Stylish guilloches with gradients
Outline object and outline stroke
Aligning and distributing - Special

 

© Monika Gause, 2017 . Impressum . Kolophon . Grafik . mediawerk