Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.CDR to .SVG Convert Using ImageMagick

Tags:

imagemagick

I am on CentOS 6.4 and trying to convert .CDR to .SVG Convert Using ImageMagick using SSH command.

  1. my 1.cdr file is in /var/www/vhosts/website.com/httpdocs/test/1.cdr
  2. once converted to SVG it should be created in the same folder

Tried the following command:

convert /var/www/vhosts/website.com/httpdocs/test/1.cdr image.svg

The Error I am getting is:

sh: mplayer: command not found convert: Delegate failed "mplayer" "%i" -really-quiet -ao null -vo png:z=3' @ delegate.c/InvokeDelegate/1032. convert: missing an image filename image.svg' @ convert.c/ConvertImageCommand/2800.

Not sure what does that mean ?

like image 599
user580950 Avatar asked Dec 06 '25 04:12

user580950


1 Answers

In order to convert CDR files you need to install uniconvertor for CDR delegate.

List of all delegates:

convert -list delegate

By default it outputs:

cdr =>          "uniconvertor" "%i" "%o.svg"; mv "%o.svg" "%o"

Install uniconvertor. For example, on Ubuntu it’s:

sudo apt-get install python-uniconvertor

Then run:

convert image.cdr -flatten -thumbnail '512x512' image.png

Or, with zoom cropping:

convert image.cdr -flatten -thumbnail '512x512^' -gravity center -crop 512x512+0+0 +repage image.png

And you’re done.

I convert to PNG here but you may use your own output format.

like image 182
Sasha MaximAL Avatar answered Dec 10 '25 22:12

Sasha MaximAL