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

snufkin - October 28, 2007 - 12:03

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

danielb - April 13, 2009 - 14:15

+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

danielb - April 21, 2009 - 11:51

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

danielb - April 22, 2009 - 03:04

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

Sharique - April 22, 2009 - 13:11

Files can be saved in files folder or a separate folder under files folder.
--
Sharique

#6

danielb - April 23, 2009 - 07:38

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

danielb - April 26, 2009 - 07:12

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.

AttachmentSize
23.png 2.36 KB

#8

danielb - May 9, 2009 - 11:26
Title:Imagemagick support» Imagemagick & GD support

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...

AttachmentSize
97.png 5.73 KB

#9

snufkin - May 9, 2009 - 11:30

nice work

#10

danielb - May 24, 2009 - 12:17

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

danielb - July 19, 2009 - 02:21

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

 
 

Drupal is a registered trademark of Dries Buytaert.