473,320 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Vector EPS/PS from PHP & ImageMagick or GD

Hi all. I'm creating a web-based application that uses PHP, MySQL &
Apache on a Windows platform. What I need to do is create images on
the fly with either GD or ImageMagick, display them on the web browser
and then save the file.

The tricky part is the format of that saved file - it needs to be an
EPS format. The image won't be anything terribly exciting - just some
basic shapes (boxes, circles, etc) and some text. No fancy colors,
textures, or effects. It will be imported into a vector-based program
and processed there. That program can only import EPS files, other
than their own proprietary format.

Is this even possible without getting into hardcore programming? Does
ImageMagick or GD offer some kind of vector-based file format? Is
there something that I'm not seeing in the documentation? If this is
better accomplished using the libraries and programs in Linux, that is
certainly an option.

Any help would be greatly appreciated!

Thanks!

Jul 17 '05 #1
1 12802
"shanergb" <sh***@sthoen.com> writes:

The tricky part is the format of that saved file - it needs to be an
EPS format. The image won't be anything terribly exciting - just some
basic shapes (boxes, circles, etc) and some text. No fancy colors,
textures, or effects. It will be imported into a vector-based program
and processed there. That program can only import EPS files, other
than their own proprietary format.
From what I know, you cannot generate EPS files in PHP. If EPS is
your requirement, I think you will have to use Imagemagick. Again
from what I know about Imagemagick, you cannot use it to output
circles, boxes etc. It is mostly used to work with images rather than
figures. You have these options

- Use PHP to generate you figure (there are functions to draw
lines/circles/rectangles), save the figure as TIFF and then use
imagemagick to convert from TIFF to eps (using imagemagick's' convert
utility)

- Use pdflib to generate the pdf with your desired figure and then use
pdf2eps utility to get your eps file

- Use PHP to generate a LaTeX file, this LaTeX file will have the
defination of what figure you want to draw and run this LaTeX file
through latex2eps to get the desired eps file.

- There is a epslib class in PHP (just search for it), but it has been
written by a $RANDOM_GUY. You can use that library to generate your
eps, AFTER you have gone through his code and satisfied yourself
that it is of good quality


Is this even possible without getting into hardcore programming? Does
ImageMagick or GD offer some kind of vector-based file format? Is
there something that I'm not seeing in the documentation? If this is
better accomplished using the libraries and programs in Linux, that is
certainly an option.


Imagemagick has support for SVG. However, its support is still not
complete. You will get more info about that on IM's user mailing
list. Check imagemagick.org for supported formats that you can use.

--
Raj Shekhar Y! : Operations Engineer
MySQL DBA, programmer and slacker Y!IM : lunatech3007
home : http://rajshekhar.net blog : http://rajshekhar.net/blog/
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Randell D. | last post by:
Folks, I've not used ImageMagick before - I've worked with the gd functions that are pre-compiled in PHP and found some of the limits problematic yet heard better reviews on ImageMagick. I've...
5
by: nawfer | last post by:
for to resize and copy original photos into a new directory and to use for a thumbnail gallery on the web; what is better: GD, Netpbm or imagemagick and why? very thank
3
by: Chuck Anderson | last post by:
I am trying to use ImageMagick from a Php script running under Windows XP. I have installed the latest version of ImageMagick - 6.2.1-7 and even tried backing up to version 5.5.7 (based on a...
1
by: Jim Red | last post by:
Hello I've just installed the OLE Object from Imagemagick. It works. But now, I want to get some informations about an image trough the identify command. I've tried SET oImg =...
3
by: Pekka Karjalainen | last post by:
How can I create image files and animations with Python? I will clarify a bit. This is a question of recreational programming. I have already made some animated gifs from Julia sets using Python...
6
by: eholz1 | last post by:
Hello Users, I am not sure if this is the place to post an imagemagick question - please advise. I have imagemagick 6.3 installed, runs from command line ok, etc. I have tried (several times...
2
by: azrael | last post by:
Hy did anyone manage to work with imahemagick through python. I've been googling like a crazy for some instalation instructions, but i cant find anything. please help. thnx
0
by: empiresolutions | last post by:
I am working with a TIF to JPG conversion that will result in the JPG being printed from a web page. My issue is the final JPG image prints VERY blurry. The TIF file that has the following...
3
by: Larry Hale | last post by:
Thank you, again, Michael, for all your help many months ago. I *FINALLY* got a HowTo done up; please see http://wiki.python.org/moin/HowTo/FileMagic I've also emailed Mr. Hupp to see if he'll...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.