SVG to layered PSD and also vice and versa

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
mukesh4846
Posts: 7
Joined: 2015-08-01T01:55:27-07:00
Authentication code: 1151

SVG to layered PSD and also vice and versa

Post by mukesh4846 »

Imagemagick "convert" command converts SVG to PSD but just provides 1 layer in PSD file.

So, is it possible to convert from SVG to layered PSD?

Also while converting from PSD to SVG, it converts in single svg image content, is it possible to convert layered PSD to SVG with all individual svg content.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: SVG to layered PSD and also vice and versa

Post by fmw42 »

This has been moved, since it had nothing to do with my scripts.

I know little about conversion of SVG. I do not know if there are layered SVG files. So if not, then no way to convert to layered PSD.

Imagemagick is basically a raster processor and relies upon delegates to read SVG file, such as Inkscape and RSVG. So you would need to find out what the features and limitations are of those delegate libraries.

Going from PSD to SVG is not a good idea with IM, since it will vectorize every pixel into the SVG file. It does not know how to recognize objects in the raster data to make into vector objects.
mukesh4846
Posts: 7
Joined: 2015-08-01T01:55:27-07:00
Authentication code: 1151

Re: SVG to layered PSD and also vice and versa

Post by mukesh4846 »

Thank you for your reply, can you please tell where can i post my question in imagemagick community to get a answer.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: SVG to layered PSD and also vice and versa

Post by snibgo »

From an SVG file, IM creates a single raster image, which you can save in whatever format you want: PSD, PNG, JPG etc.

If you want to split the SVG into a number of raster images (eg one raster image per SVG group, hence one PSD layer per group), you would need to pre-process the SVG file. As SVG is a text format, this isn't difficult.

When IM converts a raster image to SVG, as Fred says it creates one SVG object (a circle) per pixel. This is rarely what is wanted.
snibgo's IM pages: im.snibgo.com
mukesh4846
Posts: 7
Joined: 2015-08-01T01:55:27-07:00
Authentication code: 1151

Re: SVG to layered PSD and also vice and versa

Post by mukesh4846 »

What is the meaning of pre-processing the SVG file?

What should I exactly need to do?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: SVG to layered PSD and also vice and versa

Post by snibgo »

If you want multiple output layers of PSD, converted from input SVG, you would need one input SVG file per output layer.

I don't really understand the question. What do you want in the layers of PSD? Whatever you want in each layer, you would need the corresponding SVG file.
snibgo's IM pages: im.snibgo.com
Post Reply