#EPS Processing
Pixault provides end-to-end processing for EPS (Encapsulated PostScript) files — the vector format used by stock photo services like Shutterstock and Adobe Stock. Stock EPS files often pack multiple designs into a single file that's unusable without Illustrator. Pixault handles rasterization, design splitting, and vector SVG extraction automatically.
#How It Works
EPS processing is asynchronous. When you upload an EPS file, Pixault validates it, stores the original, and queues a background job to rasterize it to PNG. You can then trigger additional operations (splitting, SVG extraction) via the API.
Upload EPS
↓
Validate (PostScript header + BoundingBox)
↓
Store original, queue background job
↓
Rasterize to PNG at 300 DPI (Ghostscript)
↓
Create derived assets linked to parent
↓
[Optional] Split designs → individual PNGs
[Optional] Extract SVG → vector SVGsEach step produces derived assets — new images linked to the parent EPS via the sourceAssetId field. Derived assets have their own image IDs and can be transformed, delivered, and managed like any other image.
#Upload
Upload an EPS file using the standard upload endpoint:
curl -X POST https://img.pixault.io/api/myapp/upload \
-H "X-Client-Id: px_cl_abc123" \
-H "X-Client-Secret: pk_secret456" \
-F "[email protected]"#Validation
Pixault validates EPS files by checking:
-
PostScript header — The file must start with
%!PS-Adobe- -
BoundingBox — A
%%BoundingBox: llx lly urx uryDSC comment must be present in the first 4 KB, defining the image dimensions in PostScript points
Files that fail either check are rejected with 400 Bad Request. Maximum file size is 50 MB.
#Response
{
"imageId": "eps_01JKXYZ",
"url": "/myapp/eps_01JKXYZ",
"width": 4000,
"height": 3000,
"size": 8234567,
"isEps": true,
"processingJobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}The processingJobId lets you track the rasterization job. The isEps flag distinguishes EPS uploads from regular images.
#Background Rasterization
After upload, a background job rasterizes the EPS to PNG at 300 DPI using Ghostscript.
-
Single-page files produce one derived PNG with
derivationType: "rasterized" -
Multi-page files produce one PNG per page with
derivationType: "page-1","page-2", etc.
Page count is detected from the %%Pages: DSC comment in the file header, falling back to a Ghostscript probe if the comment is missing.
The first rasterized PNG is automatically set as the parent EPS thumbnail, so the EPS appears with a preview in your image library.
#Polling for Completion
GET /api/{project}/{imageId}/processing-status
curl https://img.pixault.io/api/myapp/eps_01JKXYZ/processing-status \
-H "X-Client-Id: px_cl_abc123" \
-H "X-Client-Secret: pk_secret456"{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"source": "eps-processing",
"status": "Running",
"totalAssets": 4,
"processedAssets": 2,
"succeededAssets": 2,
"failedAssets": 0,
"startedAt": "2026-03-15T10:30:05Z",
"completedAt": null
}|
Status |
Meaning |
|---|---|
|
|
Job queued, waiting for worker |
|
|
Rasterization in progress |
|
|
All pages processed successfully |
|
|
Processing error (check |
#Derived Assets
Every operation on an EPS (rasterization, splitting, SVG extraction) creates derived assets linked to the parent via sourceAssetId.
#Derivation Types
|
Type |
Source Operation |
Description |
|---|---|---|
|
|
Auto (upload) |
Single-page PNG at 300 DPI |
|
|
Auto (upload) |
First page of multi-page EPS |
|
|
Auto (upload) |
Second page, etc. |
|
|
Split |
First extracted design region |
|
|
Split |
Second design region, etc. |
|
|
SVG extraction |
Full-page vector SVG |
|
|
SVG extraction |
First individual design SVG |
|
|
SVG extraction |
Second design SVG, etc. |
#List Derived Assets
GET /api/{project}/{imageId}/derived
curl https://img.pixault.io/api/myapp/eps_01JKXYZ/derived \
-H "X-Client-Id: px_cl_abc123" \
-H "X-Client-Secret: pk_secret456"[
{
"imageId": "img_01JKABC",
"derivationType": "rasterized",
"contentType": "image/png",
"width": 4000,
"height": 3000,
"sizeBytes": 2456789,
"uploadedAt": "2026-03-15T10:30:10Z"
},
{
"imageId": "img_01JKDEF",
"derivationType": "split-1",
"contentType": "image/png",
"width": 1200,
"height": 900,
"sizeBytes": 345678,
"uploadedAt": "2026-03-15T10:32:00Z"
}
]Derived assets are excluded from the main image listing by default. Pass includeDerived=true to include them.
#Design Splitting
Stock EPS files frequently pack multiple designs into a single page — a grid of icons, a set of illustrations, or variations of a logo. The split operation detects and extracts individual designs automatically.
POST /api/{project}/{imageId}/split
curl -X POST "https://img.pixault.io/api/myapp/eps_01JKXYZ/split" \
-H "X-Client-Id: px_cl_abc123" \
-H "X-Client-Secret: pk_secret456"#How Splitting Works
-
The rasterized PNG is analyzed pixel by pixel
-
Each pixel's brightness is calculated — pixels with brightness >= 245 (out of 255) are considered whitespace
-
Row and column projections count non-whitespace pixels along each axis
-
Contiguous bands of content separated by gaps of whitespace are identified
-
Horizontal and vertical bands are intersected to form rectangular design regions
-
Each region is cropped and saved as a derived asset
The algorithm detects designs arranged in grids, rows, columns, or irregular layouts, as long as they're separated by whitespace gaps.
#Parameters
|
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
int |
50 |
Minimum whitespace gap (in pixels) between designs |
|
|
int |
100 |
Minimum design dimension (filters out noise) |
Adjust these if the defaults don't work for your files:
# Tighter spacing between designs
curl -X POST "https://img.pixault.io/api/myapp/eps_01JKXYZ/split?minGapPx=20"
# Only detect larger designs
curl -X POST "https://img.pixault.io/api/myapp/eps_01JKXYZ/split?minDesignPx=200"#Response 202 Accepted
{
"jobId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"statusUrl": "/api/myapp/eps_01JKXYZ/processing-status"
}Splitting is asynchronous. Poll the status URL to track progress. Each detected design becomes a derived asset with derivationType of "split-1", "split-2", etc.
#SVG Extraction
Extract vector SVGs from an EPS file, preserving paths and shapes rather than rasterizing.
POST /api/{project}/{imageId}/extract-svg
curl -X POST https://img.pixault.io/api/myapp/eps_01JKXYZ/extract-svg \
-H "X-Client-Id: px_cl_abc123" \
-H "X-Client-Secret: pk_secret456"#How Extraction Works
The pipeline converts EPS to SVG in two stages:
-
EPS to PDF — Ghostscript's
pdfwritedevice converts PostScript to PDF while preserving vector paths -
PDF to SVG —
pdftocairoextracts paths, shapes, and text into clean SVG markup
The resulting SVG is then sanitized to remove potentially dangerous elements (scripts, external references, event handlers) using an allowlist approach.
If the SVG contains multiple designs, individual design SVGs are also extracted using the same gap-detection algorithm as raster splitting, but operating on vector bounding boxes projected onto a grid.
#Derived Assets
|
Asset |
DerivationType |
Description |
|---|---|---|
|
Full-page SVG |
|
Complete vector conversion |
|
Design 1 SVG |
|
First detected design |
|
Design 2 SVG |
|
Second detected design |
#Response 202 Accepted
{
"jobId": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"statusUrl": "/api/myapp/eps_01JKXYZ/processing-status"
}#On-Demand Delivery
You can request an EPS file through the standard image delivery URL pattern:
https://img.pixault.io/myapp/eps_01JKXYZ/w_800.webpWhen the delivery pipeline encounters an EPS original, it rasterizes on-demand at 300 DPI, applies the requested transforms (resize, blur, watermark, etc.), caches the result, and returns the image. Subsequent requests for the same transform are served from cache.
This means EPS files work with all the same transform parameters as regular images — no special handling required on your end.
#Example Workflow
A typical workflow for processing a stock EPS file:
# 1. Upload the EPS
RESPONSE=$(curl -s -X POST https://img.pixault.io/api/myapp/upload \
-H "X-Client-Id: px_cl_abc123" \
-H "X-Client-Secret: pk_secret456" \
-F "[email protected]")
IMAGE_ID=$(echo $RESPONSE | jq -r '.imageId')
# 2. Wait for rasterization to complete
curl "https://img.pixault.io/api/myapp/$IMAGE_ID/processing-status"
# 3. Split into individual designs
curl -X POST "https://img.pixault.io/api/myapp/$IMAGE_ID/split"
# 4. Extract vector SVGs
curl -X POST "https://img.pixault.io/api/myapp/$IMAGE_ID/extract-svg"
# 5. List all derived assets
curl "https://img.pixault.io/api/myapp/$IMAGE_ID/derived"
# 6. Use individual designs via standard delivery
# https://img.pixault.io/myapp/img_01JKABC/w_400.webp#API Reference
|
Method |
Route |
Description |
|---|---|---|
|
POST |
|
Upload EPS file |
|
GET |
|
Check job progress |
|
GET |
|
List derived assets |
|
POST |
|
Split multi-design file |
|
POST |
|
Extract vector SVGs |