Crop and resize EPS
Native C++ API Solution to manage size of EPS images.
Transforming your EPS image just got easier! With Aspose.Page for C++ you can crop or change the size of EPS files to your exact specifications in a few lines of code. Want to make it larger? No problem. Need it smaller? We've got you covered. Our API for C++ allows you to scale your image precisely, ensuring it fits your vision like a glove. But why might you want to crop or resize an EPS image?
- If you’re designing a layout for a print or digital document, you might need to resize the EPS image to fit within specific dimensions.
- By reducing the image size, you can decrease the file size, making it easier to share, upload, or print. Smaller image files also load faster on websites and in digital documents, enhancing user experience.
- Cropping can help eliminate distracting or irrelevant parts of the image, focusing attention on the key elements, and it can also change the image’s aspect ratio to better suit your design needs. So careful cropping can improve the overall composition and visual appeal of the image.
- Cropping and resizing can help optimize the image for web use, ensuring it loads quickly and looks good on different screen sizes.
Aspose.Page provides you with the functionality to manage the borders of EPS files easily. With this API you can scale or crop images using C#. To learn more about how to deal with EPS files follow the documentation. To see the live version of the functionality try EPS Crop and EPS Resize cross-platform apps.
To use the functionality you first need to get the solution:
Open the NuGet package manager, and search for Aspose.Page and install. You may also use the following command from the Package Manager Console.
Package Manager Console Command
PM> Install-Package Aspose.Page
Steps to change the size of EPS image.
The example below shows the process of resizing .eps with the chosen units - points. The order is:
- Initialize the PsDocument object with an input stream containing an EPS file.
- Define the existing size of the image using the ExtractEpsSize() static method.
- Create an output stream for the resulting EPS file.
- Resize the PsDocument object with a new size in points with the ResizeEps() static method.
- Save the result file.
Resize EPS
The example below shows the process of cropping instead of resizing .eps with the chosen units - points. The order is:
- Initialize the PsDocument object with an input stream containing an EPS file.
- Define the existing bounding box of the image using the ExtractEpsBoundingBox() static method.
- Create an output stream for the resulting EPS file.
- Crop the PsDocument object with a new bounding box with the CropEps() static method.
- Save the result file.
Crop EPS
EPS What is EPS File Format
EPS (EPSF) or Encapsulated PostScript File Format is the format that is actually a PS program that describes what would a single page look like. It is actually limited PS plus particular notes that help encapsulate PostScript graphics to another document. EPS perfectly supports vector graphics or combined vector-raster graphics. The peculiarity of the format is that as soon as it is imported into a document, it cannot be edited anymore. That is one of the reasons to convert this format to the one you are able to work with.