Imagemagick & GD support
Sharique - October 27, 2007 - 20:18
| Project: | Drawing API |
| Version: | 5.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
I'm just curious, why ur not using ImageMagick for rendering images? I think using Imagemagic ucan render image in any format.

#1
imagemagick renders rastergraphic images. This projects first aim was to implement vectorgraphic capabilities for Drupal, that is why Drawing has built-in SVG toolkit.
I was planning to implement php-gd, and still am, but that requires an extensive amount of work, for which i have no time at the moment. But any contribution is very welcome.
#2
+1 for php-gd
I will probably do that eventually if you don't get around to it,
I wonder if there is some cheeky way to just convert SVG to a GD image
#3
I've been looking into starting a GD implementation for D6 today, and from having a bit of a think about it I don't think using the theme functions so heavily is going to be suitable. I may have to tinker with a few things, I'll see how it goes..
#4
Goods news is a bit of work can be done from the drupal core http://api.drupal.org/api/file/includes/image.gd.inc/6
Just having a bit of a dillema on what exactly that theme function should return.
The SVG toolkit returns the xml for the SVG, but something like returning the GD resource doesn't seem appropriate. The user will want the path or html for the image, which means the toolkit has to save the images somewhere first, kind of like the textimage module.
But will this design make it too inconsistent with the SVG toolkit?
#5
Files can be saved in files folder or a separate folder under files folder.
--
Sharique
#6
Well it is needed so I think that's what I'll do, if people desire the SVG module to do something similar I am sure they will say something.
#7
Yes! My first masterpiece made with the GD toolkit I'm making ... 23 because it my 23rd attempt at generating an image... well at least the 23rd attempt since the file naming code started working....
I'm not very creative, I know, but I've only implemented the 'line' theme function so far.
#8
I've implemented a few more theme functions. Getting closer but the hard stuff is still around the corner. If I can write an interpreter for SVG path syntax it's smooth sailing...
#9
nice work
#10
Well I'm slowly adding more to this, I've been distracted by a pile of issues on other modules, and paid work, but it is coming along. I have got transformations in there now, and file support should be easy. I found some GPL c code for parsing svg path syntax into bezier lines and I have some code to draw bezier lines in GD - so hopefully this means I can write a function to do paths.
#11
An update: I added transformations, files, and paths (!) but it's all blowing up at the moment when I try to render the druplicon canvas, got a lot of debugging ahead of me :P