This quick article explains how to resize EPS in C#. It includes the IDE setup, the program flow, and a working code sample to resize EPS image in C#. Furthermore, you can improvise the process by setting custom options depending on your needs.
Steps to Resize EPS File in C#
- Install Aspose.Page to resize an EPS file
- Initiate a stream to load the source EPS file
- Create an object of the PsDocument class while passing the input stream
- Scale the EPS file with the ResizeEps method while reading the dimensions of the input image
These steps summarize the procedure to change EPS photo size in C#. To begin the process, load the input EPS image, then read the image dimensions. Subsequently, adjust the image height and width values before exporting the output image.
Code to Resize EPS Image in C#
This sample code is a quick demonstration of the feature to EPS resize in C#. It uses the PsDocument class to access the source EPS image. Then modify the image width and height values to the required scale and render the output file. Additionally, you can scale the source EPS image by different units like points, inches, percentages, etc.
This guide discusses how to resize EPS file in C#. However, if you want to convert an image to EPS format, refer to the article on Convert Image to EPS in C#.