[PHP] PHP Imagemagick

2003-09-30 Thread Cameron Metzke
i have a script where people upload an image it is then renamed and is
supposed to be cripped according to the values they submit but i cant seem
to get it to crop it uploads and is renamed fine though. also i wish to use
a static name so when another picture is uploaded the old one is overwritten
that is why the input path and output path is the same.
-Code--
exec($path_imagemagick.convert -crop 0x100+0+0 $imagepath.$filename
$imagepath.$filename);
-End Code--
any ideas why this wont work?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Imagemagick

2003-09-30 Thread David T-G
Cameron --

...and then Cameron Metzke said...
% 
...
% a static name so when another picture is uploaded the old one is overwritten
% that is why the input path and output path is the same.
% -Code--
% exec($path_imagemagick.convert -crop 0x100+0+0 $imagepath.$filename
% $imagepath.$filename);
% -End Code--

To change an image rather than make a new version of it, just use
mogrify.


% any ideas why this wont work?

Start there and let us know how you do.


HTH  HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


Re: [PHP] PHP Imagemagick

2003-09-30 Thread Blue Prawn
 % a static name so when another picture is uploaded the old one is
 overwritten % that is why the input path and output path is the same.
 % -Code--
 % exec($path_imagemagick.convert -crop 0x100+0+0 $imagepath.$filename
 % $imagepath.$filename);
 % -End Code--

 To change an image rather than make a new version of it, just use
 mogrify.

 % any ideas why this wont work?

 Start there and let us know how you do.


It is a good idea too to use the pear-imagick module which is a wraper for 
imageMagick. With this you can more easily deal with errors

here is an example with the crop function:
http://grincheux.codelutin.org/~monnier/doc/imagick/crop.php

And the other exemples given in the package:
http://grincheux.codelutin.org/~monnier/doc/imagick/

===
If you use it in cli mode, think you can write errors like this:
fwrite(STDERR, handle failed!\nReason: $reason\nDescription: 
$description\n);
in stead of this:
print handle failed!BR\nReason: $reasonBR\nDescription: 
$descriptionBR\n;

===
I am interseted in writing a simple application using php-gtk and 
php-imagick. If other peoples are interested in this project, just mail me 
to talk about this.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP Imagemagick

2001-07-22 Thread Weston Houghton


Does anyone know if there are PHP specific bindings for ImageMagick out
there? If not, anyone want to work on them...

:)

Thanks,
Wes


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP Imagemagick

2001-07-22 Thread Tom Carter

How do you mean bindings?

I've used PHP and Imagemagick.. but only from the point of view of exec

Do you mean building them into PHP functions?

- Original Message - 
From: Weston Houghton [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, July 22, 2001 11:05 PM
Subject: [PHP] PHP  Imagemagick


 
 Does anyone know if there are PHP specific bindings for ImageMagick out
 there? If not, anyone want to work on them...
 
 :)
 
 Thanks,
 Wes
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP Imagemagick

2001-07-22 Thread Weston Houghton


Yup, a native PHP module for ImageMagick that accesses their API. This would
allow one to actually pass parameters a bit easier and test for success or
failure more consistently, at least, I think it would...

Wes


 How do you mean bindings?
 
 I've used PHP and Imagemagick.. but only from the point of view of exec
 
 Do you mean building them into PHP functions?
 
 - Original Message -
 From: Weston Houghton [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, July 22, 2001 11:05 PM
 Subject: [PHP] PHP  Imagemagick
 
 
 
 Does anyone know if there are PHP specific bindings for ImageMagick out
 there? If not, anyone want to work on them...
 
 :)
 
 Thanks,
 Wes
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP Imagemagick

2001-07-22 Thread Alexander Skwar

So sprach »Weston Houghton« am 2001-07-22 um 15:14:54 -0700 :
 
 Yup, a native PHP module for ImageMagick that accesses their API. This would
 allow one to actually pass parameters a bit easier and test for success or
 failure more consistently, at least, I think it would...

Hmm, don't know about ImageMagick, but have a look at php_imlib.  Find
the URL yourself! :)

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 0 hours 41 minutes

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP ImageMagick

2001-06-30 Thread Richard Lynch

 In PHP I try to run a shell command with the following source code:

 $fotonaam = 'convert -font arial -pointsize 20 -gravity center -fill
 white -draw text 5,5 VERKOCHT image.jpg image2.jpg';
 exec($fotonaam);

 PHP runs the program but the -draw text 5,5 VERKOCHT is not executed
 (there is no VERKOCHT in the image2.jpg). I tried everything but I can't
 solve the problem. Could somebody explain to me how it's possible that the
 program (convert) runs but there (seams to be) a problem with -draw text
 5,5 VERKOCHT. If I run the same command troughs telnet/ssh as root or
 nobody it works fine

 Is it something with the  and the combinative with the exec function (I
 also tried \)?

 Or is it because I run PHP in safe mode and the convert program tries to
run
 a external program what is not in the . path (you now, the basic safe mode
 restriction)?

Probably.  Or maybe that program/lib just isn't in PHP's PATH.  Try running
it as nobody, but set your $PATH to  first.

Also, try using the optional parameters to http://php.net/exec so you can
get some feedback from the OS about what error is happening, if any.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP ImageMagick

2001-06-30 Thread Chadwick, Russell


Did you try the escapeshellcmd () function ?  - Russ

---
Toolshed Computer Productions - Professional PHP Hosting
 Hosting - Dedicated Servers - Design - Programming
 http://www.toolshed51.com

-Original Message-
From: Jeffrey Barendse [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 28, 2001 8:01 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP  ImageMagick


In PHP I try to run a shell command with the following source code:

$fotonaam = 'convert -font arial -pointsize 20 -gravity center -fill
white -draw text 5,5 VERKOCHT image.jpg image2.jpg';
exec($fotonaam);

PHP runs the program but the -draw text 5,5 VERKOCHT is not executed
(there is no VERKOCHT in the image2.jpg). I tried everything but I can't
solve the problem. Could somebody explain to me how it's possible that the
program (convert) runs but there (seams to be) a problem with -draw text
5,5 VERKOCHT. If I run the same command troughs telnet/ssh as root or
nobody it works fine

Is it something with the  and the combinative with the exec function (I
also tried \)?

Or is it because I run PHP in safe mode and the convert program tries to run
a external program what is not in the . path (you now, the basic safe mode
restriction)?

Please help me.. I'm getting despaired on this in. ;-)

Regards,

Jeffrey Barendse




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP ImageMagick

2001-06-29 Thread Jeffrey Barendse

In PHP I try to run a shell command with the following source code:

$fotonaam = 'convert -font arial -pointsize 20 -gravity center -fill
white -draw text 5,5 VERKOCHT image.jpg image2.jpg';
exec($fotonaam);

PHP runs the program but the -draw text 5,5 VERKOCHT is not executed
(there is no VERKOCHT in the image2.jpg). I tried everything but I can't
solve the problem. Could somebody explain to me how it's possible that the
program (convert) runs but there (seams to be) a problem with -draw text
5,5 VERKOCHT. If I run the same command troughs telnet/ssh as root or
nobody it works fine

Is it something with the  and the combinative with the exec function (I
also tried \)?

Or is it because I run PHP in safe mode and the convert program tries to run
a external program what is not in the . path (you now, the basic safe mode
restriction)?

Please help me.. I'm getting despaired on this in. ;-)

Regards,

Jeffrey Barendse




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]