Vector EPS/PS From PHP & ImageMagick Or GD

Jul 17, 2005

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.

ADVERTISEMENT

Drawing Pies ImageMagick / Get GD's Function Imagefilledarc()'s Result In ImageMagick?

Jun 27, 2009

Is there a way to get GD's function imagefilledarc()'s result in using PHP ImageMagick? I've looked around but haven't found a satisfying solution so far. I want it to support transparency, and use it to draw pies.

View 3 Replies View Related

PHP Logo In Vector

Jul 17, 2005

Does any of you happen to have the logo in this graphic in vector
format? I haven't been able to find it anywhere else.

The graphic: http://www.i123.dk/images/bund.jpg

View 1 Replies View Related

Using Java Vector To PHP

Jul 17, 2005

I've been given the task of converting some existing java code to PHP so we can integrate it into our web based product. The problem I'm facing is that the java code makes heavy use of Vector objects to hold data. This in itself isn't a problem however the java code makes heavy use of Vector.insertElementAt(). This method inserts into the vector container at a desired location and shifts the indexes of all the other items accordingly as necessary.

View 2 Replies View Related

Submitting Vector Image

Mar 23, 2006

I am trying to build a flash 'paint' program where the user drags various vector forms from a pallete onto a canvas. once done the user clicks a 'submit' button, which somehow sends the created vector canvas image to my email in eps, swf or whatever format. does anyone know how this works?

View 1 Replies View Related

Encryption Using Md5 And Initialization Vector?

Nov 14, 2010

software recently but have been unable get any helpful product support with the following problem, because it's a coding matter, I guess.The purchased software is for a PayPal subscription management system, and it relies on user verification by way of a username (email address) and a hashed password.I have developed my own login scripts which use a hashed md5 password and all that is fine.I want to integrate my scripts with the purchased software using the supplied mySql database tables.

My problem is that the supplied software goes a step further than a hashed md5 password by applying initializing vectors to the hashed password.I cannot figure out how to modify my login code to accommodate the encrypted password that appears in the database.It is beyond my current abilities to figure this out on my own.I've attached my own login script below, and Ive attached what I think is the decryption code that comes with the purchased software.There is also a database file.
<?php
session_start();
if ($_POST['password']) {
//Connect to the database

[code]...

I suspect that there may be some other relevant code in the purchased software, and I could hunt that up if someone could tell me what to look for.

View 4 Replies View Related

Encryption: Use Of Initialization Vector Vs Key?

Feb 24, 2011

I am using PHP's mcrypt library and the AES-256 (rijndael) algorithm, which requires both a key + initialization vector to run.

My logical brainside isn't really going along with this. Isn't just one key enough?

If I had encrypted sensitive data stored in a database, which only the owner should be able to decrypt, would it be appropriate to use the users hashed password to either the key or the initialization vector to his or her data?

Should the key be considered more private than the initialization vector or is it the other way around?

View 3 Replies View Related

Output A .eps Or Vector File Using FPDF?

Oct 1, 2009

I'm trying to layout a business card on a PDF with the FPDF class using a form field that the user fills out. I have been able to create the text needed for the card, but I have a logo that I want to output as well.

The problem I am facing is that I can only find a way to add an Image as a JPEG and it looks pixelated when the user zooms in on the PDF. Is there a way to output a vector file on the PDF so when the user zooms, it retains the crisp quality? Here are the methods that FPDF allows: [URL]

View 1 Replies View Related

Vector Or Diagram Drawing Webservice?

Nov 20, 2008

I have a webapp from which I'd like to insert diagrams and images quickly and easily. I expect there is, somewhere out there, a webservice which will take a URL with a parameter that describes the vector graphics or diagram and returns an image.No unlike what google charts does for graphing data.

If I had to build it myself, do you have some ideas of how I might accomplish that?For instance, does PHP/asp/etc have a graphics library that's capable of rendering simple vector graphics?

View 4 Replies View Related

Creating Vector Graphics With Scripting Language?

Jan 6, 2011

Im trying to create vector graphics in PHP. Ive tried Cairo and I havn't been able to get it to work. I understand that imageMagick has vector functionality but the documentation on php.net is very poor can some one lead me in the right direction? The ideas is to be able to save the graphic to EPS. I also need to be able to use different fonts to output text.

View 2 Replies View Related

Encrypt / Decrypt Using A Combination Of Md5 And Initilization Vector?

Nov 14, 2010

software for a PayPal subscription management system, and it relies on user verification by way of a username (email address) and a hashed password.I have also developed my own login scripts for an application which also uses a hashed md5 password and all that works fine.I want to integrate my scripts with the purchased software using the supplied mySql database tables.

My problem is that the supplied software goes a step further than a hashed md5 password by applying initializing vectors to the hashed password.I cannot figure out how to modify my login code to accommodate the encrypted password that appears in the database.It is beyond my current abilities to work this out on my own.I've attached my own login script below, and Ive attached what I believe is the decryption code that comes with the purchased software.There is also a database file that relates to this.
<?php
session_start();
if ($_POST['password']) {
//Connect to the database 

[code]...

What I think is the decrypting code that comes with the purchased software goes like this.

<?php 
//---------------------------------------
//Given the payer_email address, return the decrypted password
function getpassword($payer_email, $dbhost, $dbusername, $dbpass, $dbname, $dbprefix, &$message) {

[code]...

The database table is here.
Code:[Select]-- Table structure for table `sec_tblusers`
--
CREATE TABLE `sec_tblusers` (

[code]...

I suspect that there may be some other relevant code in the purchased software, and I could hunt that up if someone could tell me what I should look for.

View 2 Replies View Related

Upload Vector (AI File, TIFF Or EPS) And Manipulate?

Dec 13, 2010

there any libraries /api that allow you to upload vector files such as: AI file, TIFF or EPS and Manipulate using PHP.Operations such as changing colors, measurements etc.

View 2 Replies View Related

Latitude/longitude Vector To Distance, Strange With Output?

Dec 10, 2010

I have this code to find the distance between two sets of GPS coordinates, I got the code from elsewhere on the net.

function distance($lat1, $lon1, $lat2, $lon2, $unit) {
$theta = $lon1 - $lon2;
$dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) *

[code]...

These are just made up numbers, but you can see the output of distance()looks like a number but then when I subtract the same number from it, it spits out a wierd exponential number.

View 2 Replies View Related

Parse A $_files Vector In Order To Make A Multiple Upload?

Mar 28, 2011

i want to parse a $_files vector in order to make a multiple upload. i try like this:

for($i=0; $i < count($_FILES['product_image']);$i++){PRINT_R($_FILES['product_image'][$i]);

but it gives me the error: Undefined offset: 0 in /Users.... etc then the same for 1, 3, etc. in the form i have: three fields:

<input id="product_image" type="file" name="product_image[]" >
<input id="product_image" type="file" name="product_image[]" >
<input id="product_image" type="file" name="product_image[]" >

i wonder where am i wrong? wht can't i parse the $_files vector?

View 1 Replies View Related

Finding A Script Library To Generate Vector Graphics As Pdf Or Svg Files?

Jan 10, 2010

Basically i want a library for PHP that i can use to generate vector based graphic files like svg or pdf. it need to be able to output path and not pixel based results. for example i want it to use like

generate_circle($radius)
etc

View 2 Replies View Related

Libraries (or Using GD2 Or Image Magick) To Allow The Upload And Processing Of EPS Or Vector Files?

May 19, 2010

I need to allow for scaling a user uploaded logo to different sizes for different formats, are there any libraries (included or extra) that allow for the procesing of EPS files or high res artwork for this purpose?

View 1 Replies View Related

Convert .cdr (corel Draw File) Vector Images To Jpg On Imagick API?

Jun 9, 2009

how to convert .cdr (corel draw file) vector images to jpg on imagick PHP API

View 2 Replies View Related

JavaScript Based WYSIWYG Vector Based Image Editor?

Jan 8, 2011

For a PHP based site of a client, I'm looking for a vector based image editor that allows:

end user creation of vectored images consisting of objects

supports upload of bitmap images to be used as objects inside the vector image

supports adding text objects to add to the vector image, and change properties (font name, font style, font size) of the text objects

preferably supports layering or grouping of objects inside the vector image

integrates nicely with a PHP based site (so a PHP or JavaScript library is preferred)

can store the vector image in SVG, EPS or PDF

Both commercial and FOSS solutions are OK.

View 2 Replies View Related

Open Vector Graphic Template Place Variable Text In Predefined Locations, Style Text And Then Resave The File As A PDF Or EPS?

Nov 17, 2009

I have a vector graphic template. What I need to do is open this vector graphic template place variable text in predefined locations, style this text and then resave the file as a PDF or EPS. I would also like to generate a GIF or JPEG preview of the graphic.Now I know PHP doesn't have the functions inbuilt to do this. But can I use something like Imagemagick? Or is Flash or another technology more suited to achieving what I need?

View 2 Replies View Related

Imagemagick And Php

Jan 7, 2007

I have imagemagick 6.3 installed, runs from command line ok, etc.

I have tried (several times now) to install the "MagicWand" PHP api
from the imagemagik site.

This flatly refused to "make" configure seems ok, I follow the
directions provided from the Imagemagick "INSTALL" file that comes in
the source tar.gz file (0-1.9)

I always get this error when I try to do the "make" for php after the
../configure (with a whole bunch of options (pdo, gc, zlib, etc)

error:
ext/magickwand/.libs/magickwand.o: In function
`zif_magickrecolorimage':
/files/PHP/php-5.2.0/ext/magickwand/magickwand.c:7763: undefined
reference to `MagickRecolorImage'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

the /files/PHP etc if the path to my php source.

View 6 Replies View Related

ImageMagick Example?

Aug 23, 2001

As far as i know ImageMagick is "using" PERL.....can anyone give me an example on how to use it in a PHP script....

View 1 Replies View Related

ImageMagick

Jan 19, 2007

I've managed to get ImageMagick installed on an OS X server (I've tested this by writing 'convert' in bash). how can I get PHP to access ImageMagick?

View 1 Replies View Related

Imagemagick & GD Support

Jul 24, 2003

I'm looking to create a script to resize images when they are uploaded to my site.

I have been reading alot of info on these forums and it looks like the best option is Imagemagick.

I'm running a Windows XP web server and I can't find the .exe file anywhere on the ftp list of downlaods. Can someone point me in the right direction.

Evenually I will need to find out if my service provide can support imagemagick or GD. Could someone please tell me what version of PHP you need to have to use GD?

View 3 Replies View Related

Integrating ImageMagick With PHP In IIS

Jul 9, 2003

I'm sort of new at this but I'm pretty proud of myself for configuring a W2K3 server and installing php4.3.1 and mysql successfully. Since then, I got the GD2 libraries to work and now I'm trying to install ImageMagick so a content management system I'm using (typo3) will work as well as possible.

SO...I installed IM today on to the server. It passed the test and the test image appeared. I activated IM in the content management program and now php returns lots of errors (related to forks). How do I make sure PHP knows IM is installed and integrate the two?

View 1 Replies View Related

ImageMagick Problem In PHP

Jul 16, 2005

Just a little problem I guess... I have stripped out just an imageresize
string for ImageMagic in a php-file:

<?
exec('convert -quality 100 -antialias -sample 100x100
/var/www/html/aftermath2.jpg /var/www/html/thumb_aftermath.jpg');
?>

The string would work in a shell, but not using the above php-file.

View 9 Replies View Related

System() And ImageMagick

Sep 7, 2006

the following problem occured:

i use imagemagick (Version: ImageMagick 6.2.2 05/26/05 Q16 on Fedora
Core 3 Server)
When i manually (on bash) execute:

/usr/bin/convert -size 300x267
/var/www/html/web4/html/_img/_2/b28a3240dffa1cad3dab0e877a3d7c5e.jpg
-resize 126x100+0+-6 +profile "*"
/var/www/html/web4/html/_img/_2/_tn/t_b28a3240dffa1cad3dab0e877a3d7c5e.jpg

it works. (i am root)

executing the same within a PHP Script with system(... command as shown
above ...);

i get the following output:
convert: unable to open image
`/var/www/html/web4/html/_img/_2/fa1d0a1d407f077aa98c8498b3e8be7d.jpg':
Permission denied.


The /var/ folder belongs to root and has chmod 755
/var/www/ has 777 (root),
/var/www/web4/ has 777 (apache --the httpd runs on user
apache:apache),
/var/www/web4/html/ ... till _img/_2/.... has 777 and is
apache:apache.

I really don't get this.... can anyone give me a hint? Even googling
didn't resolve this issue.

View 6 Replies View Related

ImageMagick Error

May 25, 2004

The latest version of ImageMagick doesn't enable jpeg support by default, you have to download the external library (did that), and then recompile ImageMagick..

I tried to do this, and still get the same error. Has anyone here had the same trouble, and managed to fix the problem?

View 1 Replies View Related

Configure GD / Imagemagick

Mar 16, 2006

what changes should be made to create gd library or imagemagick to install in php.ini. Please anybody help me how to configure php.ini or httpd.conf in windows2003 php4.3.2 and apache 2.0 ,Mysql 4x

View 1 Replies View Related

Php And ImageMagick In Windows?

Jul 17, 2005

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 recommendation I found during a Google search), but I can not get ImageMagick to work in Php (using exec or system). Code:

View 3 Replies View Related

Imagemagick ( Windows )

Jan 1, 2006

Could someone provide me with a post on how I can get Imagemagick working with php?

I've seen plenty of sites related to Linux but unfortunately I'm on a Windows box.

Do I have to register a specific dll and edit my php.ini or is there something else I need to do to start working with the Imagemagick api?

View 3 Replies View Related

GD Library Vs Imagemagick

Aug 21, 2006

I've been playing around with PHP and using the GD Libary to resize .jpg images. The tutorials I've been reading say things like this:

PHP comes with two functions to do this: imagecopyresize() and imagecopyresampled(). The first function simply resizes the image, whilst the second function will resize but also resample the image. This means that the second function will create a resized image that looks much better.

============

So, I experimented with "resample" and noticed it seemed really slow.

I then went back to using Perl with Imagemagick. The Imagemagick results always have higher quality resizing and much faster. So I'm sticking with Perl Imagemagick.

============

Does anyone else have an idea of why using PHP GD is seemingly slow and poor quality? Am I missing something with the tutorials I'm reading?

View 4 Replies View Related

Trying To Use ImageMagick On GoDaddy

Sep 14, 2007

I'm using GoDaddy. They claim that ImageMagick is installed on all their Linux hosting accounts. So I tried the script below that I found in order to see if I could get this to work.

<?php

header('Content-type: image/jpeg');

$image = new Imagick('image.jpg');
// If 0 is provided as a width or height parameter,
// aspect ratio is maintained
$image->thumbnailImage(100, 0);
echo $image;
?>


The result is...

<b>Fatal error</b>: Cannot instantiate non-existent class: imagick in <b>/home/content/j/o/h/johnbuhladmin/html/Test_Area/Image.php</b> on line <b>5</b><br />

Can anyone guide me on how to set up Imagemagick on GoDaddy??

View 2 Replies View Related

GD Netpbm Or Imagemagick What Is Better?

Jul 17, 2005

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?

View 5 Replies View Related

Execute Imagemagick ?

Apr 6, 2010

when I try to execute the imagemagick script using exec in PHP, I'm getting no results. I've checked to make sure the directories have the correct permissions and such. Is there a step I'm missing?

$run = exec('convert -size 200x200 xc:none -fill daisy.jpg -draw "circle 100,100 100,1" uploads/new.png');
Edit: Imagemagick is installed.

View 1 Replies View Related

ImageMagick / MagickWand

Sep 11, 2007

I'm trying to use MagickWand to do some seemingly simple tasks that gdlibrary is not powerful enough to do. However the Magickwand documentation is somewhere between sparse and nonexistent, and it is not helpful at all. I don't have the time to spend messing around with every single MagickWand function that looks like it might be useful. There are no good tutorials to using MagickWand online. If anyone is experienced with MagickWand and could point me in the right direction, that would be great.

The tasks I want to do are as follows:

1. Overlay one PNG onto another. This would seem simple enough - but MagickWand seems to insist on using some strange algorithm when I try to overlay the images. For example if I overlay a grey image onto some base image, rather than assuming the pixels are 100% opacity pixels with an RGB of 128,128,128 (as they actually are), it seems to think they are 0,0,0 pixels with an opacity of 50%. I don't think this is the actual algorithm it is using but it is one example. The function I am using is as follows:

MagickCompositeImage($image->outline,$image->base,MW_OverCompositeOp,0,0);
As you can see I'm trying to overlay an outline onto a base image, but every time I try to do that, no matter which order I arrange the resources in the function in, it will output the grey base image "over" the black outline image (so that you can only see the edges of the outline that are visible underneath the grey base image). Is there a simpler way to overlay PNG images similar to gdlibrary's imagecopy function?

2. Change the colour of an image. Say I have pixels with RGB value x,y,z with a varying alpha channel. I want to change those pixels to a different RGB value but leave the alpha channel alone. Is there any way to do this?

View 1 Replies View Related

How To Get Imagemagick Working With PHP On Localhost.

Sep 4, 2002

Does anyone know how to get Imagemagick working with PHP on localhost. I have Windows XP pro with PHP4.2.2 on Apache.

I have installed ImageMagick and it works ok from the command prompt, but i cant seem to run the commands within PHP from the system() command?

View 1 Replies View Related

Better Quality Thumbnails From Imagemagick?

Mar 25, 2006

I am trying various imagemagick options to attempt to create better, sharper thumbnails.

The images are mostly photos of people though occasionally it will be line art. I've tried using -thumbnail and -resize but I am not quite clear on the filters, which ones are best and how to do it right in one pass.

I'm not too worried about cpu time, quality is the critical component.

View 1 Replies View Related

PHP4 Vs ImageMagick For Images?

May 20, 2001

Which do you think is better for dynamic generation of composite images? I've heard some talk of ImageMagick's overhead? Do you know if that is very extensive?

View 6 Replies View Related

ImageMagick Flip Flop And Php

Jan 17, 2004

I want to use ImageMagick to flip and flop three 30x30 gif images that are used on every page of my website. I could easily just keep using 4 images but all 4 images are the same except for vertical and horizontal. So I simply want to rotate around one of the images to fill in the other three corners.

1) What kind of burden will this put on the server?

2) Will this delay the loading of my webpage?

3) Is it worth it or should I just stick with the 4 gifs?

4) I have found some examples of using ImageMagick but someone could save me tons of time if they could help sum it up. Most of the examples are long and somewhat complicated. I only need to flip and flop. Here is a example I lifted off my web hosts message boards on how to resize. How could I change this to flip or flop?

View 1 Replies View Related

Lossless Rotating With Imagemagick

Sep 20, 2003

I have a photoalbum where one can upload files and then put a title and comment to the image. I also have added the feature to rotate images 90 and -90 degrees.

Each time (why would you rotate it more than once?) you rotate the image, it gets saved with jpeg-compression and it will damage the file. How do I make a non-lossy rotation with either Imagemagick or possibly the GD-library?

View 2 Replies View Related

PECL Dll's For Win32 / ImageMagick 6.0.3

Jul 17, 2005

I have tried to install ImageMagick on my server, but my apache stalls
when i try to start it with the following line added to my php.ini file:

extension=php_imagick.dll

I can't even kill the apache procees when I try to run it with this
option added, so I have to restart the entire server each time I have to
return to the original setting of php.ini

I have installed ImageMagick on my server, downloaded from
http://www.imagemagick.org/ and the php api for it from
http://kromann.info/pecl.php (rediredted from) http://pecl.php.net.

According to the 'kromann' page I must install another dll as well for
the extension to work, and I have placed this dll in the dll directery
under php along with the 'php_imagick.dll', but the result is the same.

I have also tried copying the dll's to the root of the php installation,
the winNT root and the winNT/system32 folder, but the result is the same.

Im running php 4.3.7 , apache 1.3.31 and win2000

View 3 Replies View Related

Using Exec To Run An ImageMagick Script

Jul 24, 2007

Using exec to run an ImageMagick script after using move_uploaded_file to a temp folder in my directory:

exec(convert /home/twsports/public_html/images/news/tmp/main_football.jpg -resize 150x150 /home/twsports/public_html/images/news/main_football.jpg)

I have chmod the /news/ and /news/tmp/ directories to 777 to allow read/write/execute

The file is being moved to tmp but the exec function is not working. When I ssh the command it works.

View 4 Replies View Related

Image Resizing *without* GD Or ImageMagick

Apr 27, 2004

Basically I need to thumbnail images that are being uploaded, I would like to resize and save them to something smaller. Is it even possible to do such in PHP without the use of GD or ImageMagic? The host is only running php 4.0.6 as well...

View 1 Replies View Related

ImageMagick Identify Problem

Oct 13, 2005

I'm new with ImageMagick, so stuck with one problem. I need IM Identify function to get image size, and it works sweet. But it need attribute to be filename. And for particular reason i have picture in variable as binary data (I can't avoid it). With GD there was not problems because ImageCreateFromString make image resource. But now I need IM because new versions of GD don't support GIF.

So, this code works nice:

<?php
$commandIM = "identify image.jpg";
exec ($commandIM, $output, $result);
print_r ($output);
?>

But how to make it work from binary dana, not filename ? This is not working because IM Identify works with file directly:

<?php
$filename = "image.jpg";
$fd = fopen ($filename, "r");
$contents = fread ($fd, filesize ($filename));
fclose ($fd);
exec ($contents, $output, $result);
print_r ($output);
?>

Ofcourse I can save temporary filename and then get with IM and delete, but want avoid that slow-down if there is other ways.

View 3 Replies View Related

Use ImageMagick Or GD2 With ImageAPI In Drupal?

Nov 8, 2009

Why? What are the pros and cons of each?

View 2 Replies View Related

ADVERTISEMENT