AI to DXF conversion were pixelated

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
naiyar.azam
Posts: 1
Joined: 2017-09-03T22:42:29-07:00
Authentication code: 1151

AI to DXF conversion were pixelated

Post by naiyar.azam »

Hi Team,

I am using IM Version: ImageMagick 7.0.5-1 Q16 x64 2017-03-04
http://www.imagemagick.org, for some of my use cases,
i am trying to convert .ai file to .dxf file format using command line, but
the output .dxf file getting pixelated.

How to avoid this?
Can IM convert from vector to vector ? As both .ai and .dxf are vector
file .

I used following commands to convert:
1. magick input_file.ai -units PixelsPerInch -density 300 output_file.dxf
2. magick input_file.ai output_file.dxf

But in both cases I am getting output_file as pixelated.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: AI to DXF conversion were pixelated

Post by Bonzo »

Imagemagick is a raster image program so I would guess it converts the svg to a raster format, processes and the outputs as an svg.
User avatar
GeeMack
Posts: 718
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Re: AI to DXF conversion were pixelated

Post by GeeMack »

naiyar.azam wrote: 2017-09-03T23:04:10-07:00I used following commands to convert:
1. magick input_file.ai -units PixelsPerInch -density 300 output_file.dxf
2. magick input_file.ai output_file.dxf

But in both cases I am getting output_file as pixelated.
When converting vector graphics with IM you will usually get better results by setting the density before reading in the input image. Try something like this...

Code: Select all

magick -units PixelsPerInch -density 300 input_file.ai output_file.dxf
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: AI to DXF conversion were pixelated

Post by fmw42 »

ImageMagick 7.0.5-1 is about 20 versions old. You might want to upgrade. But ImageMagick is not a good vector to vector processor. It will read the vector file and rasterize it and then if you want a vector output each pixel will be vector dots. If you still want to go that route, then GeeMack's code is correct. You need to set the density before reading the AI image to get high resolution. If after reading the image, it is too big, you can always resize to minimize it.

It is always best to provide an example input and output. That way we can test any issue you find. You can upload to any free hosting service that will not change your image formats, such as dropbox.com and then put the URLs here.

I am on a Unix-like system (Mac OSX) and not Windows. But I do not see DXF format listed at the ImageMagick supported formats page at http://www.imagemagick.org/script/formats.php#supported.

Nor do I see it listed when I do

Code: Select all

convert -list format
Perhaps it is available on Windows systems. So try my command and see if you can find it.
Post Reply