Encapsulated PostScript

Encapsulated PostScript (EPS) is a format based on PostScript, designed to be more like an image format than a page description language.

Formats
An EPS file may contain a "preview" version of the image, intended to be used, for example, by document editors when displaying the image on the screen. This has a surprisingly large effect on the format. The varieties of EPS are best categorized based on the type of preview image.

Also, be aware that some image viewers may display only the preview image, instead of the full-quality main image.

No preview
We'll call an EPS file with no preview image a "plain EPS" file, to distinguish it from the other EPS varieties.

Plain EPS is a subformat of PostScript. It is a plain text file.

EPSI
EPSI (Encapsulated PostScript Interchange) is the same as plain EPS, except that it has a preview image inside it. The preview uses a simple raster image format. EPSI format can be identified by the presence of a line beginning with " ".

PICT preview
This variety is only relevant to the Macintosh platform. It contains a PICT file in the Resource Fork, and a plain EPS file in the data fork.

TIFF/WMF preview
This is a wrapper format containing an embedded TIFF or WMF file, and an embedded plain EPS file. It is sometimes called DOS EPS Binary. It begins with a 30-byte or a 32-byte binary header. In most cases then the EPS text comes and finally the preview image. For the variant with the TIFF preview image sometimes the file extension  is used.

Identification
Files with a TIFF or WMF preview image begin with signature bytes.

All other EPS formats begin with ASCII text " " (where each  is a single digit).

Specifications

 * Encapsulated PostScript Version 3.0

Software

 * Ghostscript: A free PostScript interpreter
 * Ghostview and GSview: Viewers based on Ghostscript
 * ImageMagick (requires Ghostscript)
 * XnView (requires Ghostscript)
 * EPS Viewer
 * CorelDRAW

Sample files

 * http://aminet.net/pix/eps
 * http://cd.textfiles.com/dtpfmwaves/
 * https://example-files.online-convert.com/vector%20image/eps/example.eps
 * http://file.fyicenter.com/b/sample.eps
 * https://telparia.com/fileFormatSamples/image/eps/

Links

 * Wikipedia article
 * , from the Encyclopedia of Graphics File Formats
 * FireEye blog post about vulnerability in Microsoft's EPS implementation in 2015 (and part 2)
 * ForensicsWiki entry (all information already copied over)
 * Apple dropping support in MacOS Ventura