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?".
fmw42 wrote:try putting your input right after the convert. it may or may not help
also try replacing $widthx$height\! with ${width}x${height}\! as the x may be read as part of widthx, ie. as $widthx as the first variable
have you checked to see that width and height variables are actually the desired values?
I am confused -- is your input svg or png?
If svg, does
convert -list format
contain
SVG SVG rw+ Scalable Vector Graphics
I put the input right after the convert, and nothing was changed. I put the brackets in, and I got an error. And yes, width and height are the desired values. SVG is the input format, and I sent an e-mail to my host to either check that or enable shell access.
EDIT: Alright, the host claims that SVG is supported, so I have no idea at the moment.
Are you using an IM API or perhaps PHP exec command?
If so, what is your exact command? Perhaps someone more familiar with your API or PHP may be able to find an error in your syntax. In command line mode, the {} are necessary to keep $widthx from being interpreted as a variable rather than $width. Sorry I am only familiar with the command line mode of IM.
When using SVG IM has two choices. RSVG (a delegate library, and the prefered choice) or as intenal MSVG rendered that converts SVG to MVG the IM -draw commands.
{} may need to be {$width}x{$height} in PHP. but I don't see any PHP exec command, so I am not sure what to tell you. Some PHP or whatever API you are using expert will likely need to help you. You can always try replacing the variables with the actual values in a test case and see if that works. Try making things as simple as possible to track down where it is failing. Can you run your command on the command line? Do you have permissions set up properly for files and does PHP know where IM is located?
fmw42 wrote:{} may need to be {$width}x{$height} in PHP. but I don't see any PHP exec command, so I am not sure what to tell you. Some PHP or whatever API you are using expert will likely need to help you. You can always try replacing the variables with the actual values in a test case and see if that works. Try making things as simple as possible to track down where it is failing. Can you run your command on the command line? Do you have permissions set up properly for files and does PHP know where IM is located?
It's definitely reading the image sizes; I'll change it and the thumbnail will change accordingly. So, somehow ImageMagick isn't thumbnailing the SVG correctly.
I am not an expert on svg, but perhaps you can skip the thumbnail step by specifying the density for the output from the svg when converting to png, or specify the output size you want in the svg commands.