Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save aspose-com-gists/056cbfa6a7d9862248da41bcf282f8be to your computer and use it in GitHub Desktop.

Select an option

Save aspose-com-gists/056cbfa6a7d9862248da41bcf282f8be to your computer and use it in GitHub Desktop.
Convert image to EPS with .NET

Convert Image to EPS Examples

These snippets show how to convert raster images (PNG, JPEG, BMP, TIFF, GIF) to EPS using Aspose.Page for .NET. You can generate press‑ready EPS with optional preview, control colorspace and resolution, and prepare artwork for downstream PS/PostScript workflows.

Key Use Cases

  • Convert PNG to EPS
  • Convert JPEG to EPS
  • Convert BMP to EPS
  • Convert TIFF to EPS
  • Convert GIF to EPS

How to Run Examples

  1. Make sure Aspose.Page for .NET is referenced in your project. On Windows, install via NuGet Aspose.Page. On non‑Windows OS, use Aspose.Page.Drawing library.
  2. Copy the desired code snippet into your project.
  3. Get a temporary license and apply it as shown in the licensing guide.
  4. Build and run.

Restrictions

In evaluation mode, the output EPS file is limited to 1Mb and contains a red evaluation warning. Use a paid or temporary license to remove limitations.

Related Documentation

Detailed information about converting images to EPS can be found in Convert image to EPS chapter of our tutorial.

Related Resources

Requirements

  • .NET 6.0+, .NET Core, or .NET Framework
  • Aspose.Page for .NET library
Aspose.Page for .NET – Convert Image to EPS Examples
// Convert BMP image to EPS from Bitmap object to file.
// Learn more: https://docs.aspose.com/page/net/convert/bmp-to-eps/
// Create default options
PsSaveOptions options = new PsSaveOptions();
using (Bitmap bmp = new Bitmap(DataDir + "input.bmp"))
{
// Save BMP bitmap to EPS file
PsDocument.SaveImageAsEps(bmp, OutputDir + "output_bmp.eps", options);
}
// Convert BMP image to EPS from Bitmap object to stream.
// Learn more: https://docs.aspose.com/page/net/convert/bmp-to-eps/
// Create default options
PsSaveOptions options = new PsSaveOptions();
using (Bitmap bmp = new Bitmap(DataDir + "input.bmp"))
{
// Create output stream for EPS
using (FileStream output = new FileStream(OutputDir + "output_bmp.eps", FileMode.Open))
{
// Save BMP bitmap to EPS file stream
PsDocument.SaveImageAsEps(bmp, output, options);
}
}
// Convert BMP image to EPS using files paths.
// Learn more: https://docs.aspose.com/page/net/convert/bmp-to-eps/
// Create default options
PsSaveOptions options = new PsSaveOptions();
// Save BMP image to EPS file
PsDocument.SaveImageAsEps(DataDir + "input.bmp", OutputDir + "output_bmp.eps", options);
// Convert BMP image to EPS using streams.
// Learn more: https://docs.aspose.com/page/net/convert/bmp-to-eps/
// Create default options
PsSaveOptions options = new PsSaveOptions();
// Create input stream from image
using (FileStream input = new FileStream(DataDir + "input.bmp", FileMode.Open))
{
// Create output stream for EPS
using (FileStream output = new FileStream(OutputDir + "output_bmp.eps", FileMode.Open))
{
// Save BMP image from input file stream to EPS file output stream
PsDocument.SaveImageAsEps(input, output, options);
}
}
// Convert EMF image to EPS from Bitmap object to file.
// Learn more: https://docs.aspose.com/page/net/convert/emf-to-eps/
// Create default options
PsSaveOptions options = new PsSaveOptions();
using (Bitmap bmp = new Bitmap(DataDir + "input.emf"))
{
// Save EMF bitmap to EPS file
PsDocument.SaveImageAsEps(bmp, OutputDir + "output_emf.eps", options);
}
// Convert EMF image to EPS from Bitmap object to stream.
// Learn more: https://docs.aspose.com/page/net/convert/emf-to-eps/
// Create default options
PsSaveOptions options = new PsSaveOptions();
using (Bitmap bmp = new Bitmap(DataDir + "input.emf"))
{
// Create output stream for EPS
using (FileStream output = new FileStream(OutputDir + "output_emf.eps", FileMode.Open))
{
// Save EMF bitmap to EPS file stream
PsDocument.SaveImageAsEps(bmp, output, options);
}
}
// Convert EMF image to EPS using files paths.
// Learn more: https://docs.aspose.com/page/net/convert/emf-to-eps/
// Create default options
PsSaveOptions options = new PsSaveOptions();
// Save EMF image to EPS file
PsDocument.SaveImageAsEps(DataDir + "input.emf", OutputDir + "output_emf.eps", options);
// Convert EMF image to EPS using streams.
// Learn more: https://docs.aspose.com/page/net/convert/emf-to-eps/
// Create default options
PsSaveOptions options = new PsSaveOptions();
// Create input stream from image
using (FileStream input = new FileStream(DataDir + "input.emf", FileMode.Open))
{
// Create output stream for EPS
using (FileStream output = new FileStream(OutputDir + "output_emf.eps", FileMode.Open))
{
// Save EMF image from input file stream to EPS file output stream
PsDocument.SaveImageAsEps(input, output, options);
}
}
// Convert GIF image to EPS from Bitmap object to file.
// Learn more: https://docs.aspose.com/page/net/convert/gif-to-eps/
// Create default options
PsSaveOptions options = new PsSaveOptions();
using (Bitmap bmp = new Bitmap(DataDir + "input.gif"))
{
// Save GIF bitmap to EPS file
PsDocument.SaveImageAsEps(bmp, OutputDir + "output_gif.eps", options);
}
// Convert GIF image to EPS from Bitmap object to stream.
// Learn more: https://docs.aspose.com/page/net/convert/gif-to-eps/
// Create default options
PsSaveOptions options = new PsSaveOptions();
using (Bitmap bmp = new Bitmap(DataDir + "input.gif"))
{
// Create output stream for EPS
using (FileStream output = new FileStream(OutputDir + "output_gif.eps", FileMode.Open))
{
// Save GIF bitmap to EPS file stream
PsDocument.SaveImageAsEps(bmp, output, options);
}
}
// Convert GIF image to EPS using files paths.
// Learn more: https://docs.aspose.com/page/net/convert/gif-to-eps/
// Create default options
PsSaveOptions options = new PsSaveOptions();
// Save GIF image to EPS file
PsDocument.SaveImageAsEps(DataDir + "input.gif", OutputDir + "output_gif.eps", options);
// Convert GIF image to EPS using streams.
// Learn more: https://docs.aspose.com/page/net/convert/gif-to-eps/
// Create default options
PsSaveOptions options = new PsSaveOptions();
// Create input stream from image
using (FileStream input = new FileStream(DataDir + "input.gif", FileMode.Open))
{
// Create output stream for EPS
using (FileStream output = new FileStream(OutputDir + "output_gif.eps", FileMode.Open))
{
// Save GIF image from input file stream to EPS file output stream
PsDocument.SaveImageAsEps(input, output, options);
}
}
// Convert JPEG image to EPS from Bitmap object to file.
// Learn more: https://docs.aspose.com/page/net/convert/jpg-to-eps/
// Create default options
PsSaveOptions options = new PsSaveOptions();
using (Bitmap bmp = new Bitmap(DataDir + "input.jpg"))
{
// Save JPEG bitmap to EPS file
PsDocument.SaveImageAsEps(bmp, OutputDir + "output_jpg.eps", options);
}
// Convert JPEG image to EPS from Bitmap object to stream.
// Learn more: https://docs.aspose.com/page/net/convert/jpg-to-eps/
// Create default options
PsSaveOptions options = new PsSaveOptions();
using (Bitmap bmp = new Bitmap(DataDir + "input.jpg"))
{
// Create output stream for EPS
using (FileStream output = new FileStream(OutputDir + "output_jpg.eps", FileMode.Open))
{
// Save JPEG bitmap to EPS file stream
PsDocument.SaveImageAsEps(bmp, output, options);
}
}
// Convert JPEG image to EPS using files paths.
// Learn more: https://docs.aspose.com/page/net/convert/jpg-to-eps/
// Create default options
PsSaveOptions options = new PsSaveOptions();
// Save JPEG image to EPS file
PsDocument.SaveImageAsEps(DataDir + "input.jpg", OutputDir + "output_jpg.eps", options);
// Convert JPEG image to EPS using streams.
// Learn more: https://docs.aspose.com/page/net/convert/jpg-to-eps/
// Create default options
PsSaveOptions options = new PsSaveOptions();
// Create input stream from image
using (FileStream input = new FileStream(DataDir + "input.jpg", FileMode.Open))
{
// Create output stream for EPS
using (FileStream output = new FileStream(OutputDir + "output_jpg.eps", FileMode.Open))
{
// Save JPEG image from input file stream to EPS file output stream
PsDocument.SaveImageAsEps(input, output, options);
}
}
// Convert PNG image to EPS from Bitmap object to file.
// Learn more: https://docs.aspose.com/page/net/convert/png-to-eps/
// Create default options
PsSaveOptions options = new PsSaveOptions();
using (Bitmap bmp = new Bitmap(DataDir + "input.png"))
{
// Save PNG bitmap to EPS file
PsDocument.SaveImageAsEps(bmp, OutputDir + "output_png.eps", options);
}
// Convert PNG image to EPS from Bitmap object to stream.
// Learn more: https://docs.aspose.com/page/net/convert/png-to-eps/
// Create default options
PsSaveOptions options = new PsSaveOptions();
using (Bitmap bmp = new Bitmap(DataDir + "input.png"))
{
// Create output stream for EPS
using (FileStream output = new FileStream(OutputDir + "output_png.eps", FileMode.Open))
{
// Save PNG bitmap to EPS file stream
PsDocument.SaveImageAsEps(bmp, output, options);
}
}
// Convert PNG image to EPS using files paths.
// Learn more: https://docs.aspose.com/page/net/convert/png-to-eps/
// Create default options
PsSaveOptions options = new PsSaveOptions();
// Save PNG image to EPS file
PsDocument.SaveImageAsEps(DataDir + "input.png", OutputDir + "output_png.eps", options);
// Convert PNG image to EPS using streams.
// Learn more: https://docs.aspose.com/page/net/convert/png-to-eps/
// Create default options
PsSaveOptions options = new PsSaveOptions();
// Create input stream from image
using (FileStream input = new FileStream(DataDir + "input.png", FileMode.Open))
{
// Create output stream for EPS
using (FileStream output = new FileStream(OutputDir + "output_png.eps", FileMode.Open))
{
// Save PNG image from input file stream to EPS file output stream
PsDocument.SaveImageAsEps(input, output, options);
}
}
// Convert TIFF image to EPS from Bitmap object to file.
// Learn more: https://docs.aspose.com/page/net/convert/tiff-to-eps/
// Create default options
PsSaveOptions options = new PsSaveOptions();
using (Bitmap bmp = new Bitmap(DataDir + "input.tiff"))
{
// Save TIFF bitmap to EPS file
PsDocument.SaveImageAsEps(bmp, OutputDir + "output_tiff.eps", options);
}
// Convert TIFF image to EPS from Bitmap object to stream.
// Learn more: https://docs.aspose.com/page/net/convert/tiff-to-eps/
// Create default options
PsSaveOptions options = new PsSaveOptions();
using (Bitmap bmp = new Bitmap(DataDir + "input.tiff"))
{
// Create output stream for EPS
using (FileStream output = new FileStream(OutputDir + "output_tiff.eps", FileMode.Open))
{
// Save TIFF bitmap to EPS file stream
PsDocument.SaveImageAsEps(bmp, output, options);
}
}
// Convert TIFF image to EPS using files paths.
// Learn more: https://docs.aspose.com/page/net/convert/tiff-to-eps/
// Create default options
PsSaveOptions options = new PsSaveOptions();
// Save TIFF image to EPS file
PsDocument.SaveImageAsEps(DataDir + "input.tiff", OutputDir + "output_tiff.eps", options);
// Convert TIFF image to EPS using streams.
// Learn more: https://docs.aspose.com/page/net/convert/tiff-to-eps/
// Create default options
PsSaveOptions options = new PsSaveOptions();
// Create input stream from image
using (FileStream input = new FileStream(DataDir + "input.tiff", FileMode.Open))
{
// Create output stream for EPS
using (FileStream output = new FileStream(OutputDir + "output_tiff.eps", FileMode.Open))
{
// Save TIFF image from input file stream to EPS file output stream
PsDocument.SaveImageAsEps(input, output, options);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment