Convert PNG to EPS with transparent background

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
arjunarmia
Posts: 2
Joined: 2018-08-07T22:45:27-07:00
Authentication code: 1152

Convert PNG to EPS with transparent background

Post by arjunarmia »

I have a png image with transparent background and i tried to convert that to an eps file using convert command and got eps image with white background.

I want eps image with transparent background.I have a php application for designing images for tshirt printing,So image transparency is must. Also image quality of output eps image is pretty bad and image size is really big comparing to input size.

I had tried command
convert test.png -resize 1024x1024 -density 300 -units pixelsperinch -quality 100 -compress none -alpha set -flatten -background none -depth 8 test.eps

Is there any option to maintain transparency in output image? Is background white by default? How can we improve output eps image quality?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Convert PNG to EPS with transparent background

Post by snibgo »

IM version? Platform? Sample image?

The answer you got at https://stackoverflow.com/questions/517 ... background covers most aspects.

IM is a raster image processor. It doesn't vectorize images.
snibgo's IM pages: im.snibgo.com
arjunarmia
Posts: 2
Joined: 2018-08-07T22:45:27-07:00
Authentication code: 1152

Re: Convert PNG to EPS with transparent background

Post by arjunarmia »

IM version : 7.0.8-8
Platform : Ubuntu linux
Sample image: Image

Can we do that using masked images?Will it work?
Friedbert Sch.
Posts: 2
Joined: 2018-12-07T02:52:11-07:00
Authentication code: 1152

Re: Convert PNG to EPS with transparent background

Post by Friedbert Sch. »

EPS has per definition a vector format with no transparencies.
The graphic industrie "missuses" eps with included pixelgraphics and a clipping path (this path stored as vector in eps).
Some programms like framemaker use the eps with included clippingpath to generate a part transparent image on the fly.
(if you load this eps in framemaker, it will cut away everything from the image which lies outside the clipping path, resulting
in a "part" transparent image.
This is mostly missunderstood by the programmers of imagemagick.
(of cause it is wired and not really documented)
Imagemagick can load and use a clippingpath but not save it.
With imagmagick you can save the results of a processed clippingpath in a pixel fileformat.

A solution could be to export a PDF. PDF is capable of vector, pixel and transparency.
Post Reply