[PHP] PHP and GD
After uploading the picture, so the program should first upload the picture, then open it, cut it in like 6 pieces and save all the pieces and remove the original uploaded file. regards patrick "- Edwin -" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] > Hi, > > On Thu, 25 Mar 2004 02:03:26 +0100 > [EMAIL PROTECTED] (Patrik Fomin) wrote: > > > Hi, > > > > Is there anyway to split a picture with PHP (GD) ? > > > > Im uploading lots of pictures and i want to split them in 6 > > pieces to make em load faster, is there anyway to do this in > > PHP ? > > You mean, split them using PHP? *Before* uploading? Then, no. > (Unless of course you have PHP installed on the client then there > must be a way...) > > -- > > - E - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and GD
Hi, Is there anyway to split a picture with PHP (GD) ? Im uploading lots of pictures and i want to split them in 6 pieces to make em load faster, is there anyway to do this in PHP ? regards patrick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php and gd
PHP 4.3.2 has GD bundled with it, if you compile it from source do --with-gd to use the bundled library. It sounds like you need to install GD2, you can find it on freshmeat.net or probably find an RPM for your distro somewhere. If you have libjpeg and libpng I've had no problems using the bundled GD library with PHP, if you take the PHP compile line from phpinfo() it should be pretty easy to recompile your PHP and at the same time upgrade to 4.3.2 :). Take a look at http://www.php.net/manual for install instructions if you need more information. Jason David Miller wrote: Hello I hope someone can help me. I use my local machine to develop and then upload to whatever site. I have one site that does some image resizing, uses a call to imagecreatetruecolor. Works fine on the host and used to work fine on my local machine. But now that I come back to make some changes it no longer works on local machine. I get this warning: Warning: imagecreatetruecolor(): requires GD 2.0 or later. I was using RedHat 8.0 and a short time back I ran up2date that upgraded the php but not the gd. I think this is where the problem came in. I tried to upgrade gd but there were dependicies that seem like it would reguire updating half the system. If I remember gd 2.0 wanted db4.1 and db4.0 is used by many, many things. I thought it would be easier to simply upgrade from RedHat 8 to RedHat 9 which is what I did. It took me all day to get everything straighened out and running again but I still have the same problem getting the same warning. If I run a script that contains the following: // Show all information, defaults to INFO_ALL phpinfo(); ?> I am told that I am now running PHP Version 4.2.2 and if I go down to the gd section the second line says GD Version 1.6.2 or higher. I tried uninstalling and reinstalling the php but this didn't help. Thanks David Miller -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php and gd
Hello I hope someone can help me. I use my local machine to develop and then upload to whatever site. I have one site that does some image resizing, uses a call to imagecreatetruecolor. Works fine on the host and used to work fine on my local machine. But now that I come back to make some changes it no longer works on local machine. I get this warning: Warning: imagecreatetruecolor(): requires GD 2.0 or later. I was using RedHat 8.0 and a short time back I ran up2date that upgraded the php but not the gd. I think this is where the problem came in. I tried to upgrade gd but there were dependicies that seem like it would reguire updating half the system. If I remember gd 2.0 wanted db4.1 and db4.0 is used by many, many things. I thought it would be easier to simply upgrade from RedHat 8 to RedHat 9 which is what I did. It took me all day to get everything straighened out and running again but I still have the same problem getting the same warning. If I run a script that contains the following: // Show all information, defaults to INFO_ALL phpinfo(); ?> I am told that I am now running PHP Version 4.2.2 and if I go down to the gd section the second line says GD Version 1.6.2 or higher. I tried uninstalling and reinstalling the php but this didn't help. Thanks David Miller -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and GD
That directory is VERY close to root. Is that what you intended? "J. Anderson Scarbrough" <[EMAIL PROTECTED]> on 24/09/2001 15:59:04 To: [EMAIL PROTECTED] cc: Subject: [PHP] PHP and GD I am trying to create PNG images on the fly using the following code. if(file_exists($key)) { $diff = time() - filemtime($key); if($diff >= 600) { unlink($key); } } $im = ImageCreateFromPNG($value); $isCreated = imagePNG($im, $key, '80'); //error occurs here I recieve the following error on the line indicated above. imagepng: unable to open '/images/image1.png' for writing When I run phpinfo it shows PHP as begin copiled with GD support with PNG enable on GD (see below) GD Support enabled GD Version 1.6.2 or higher PNG Support enabled WBMP Support enabled The only other issue i could think of was permissions, but i have changed permissions to "rwx" all the way across for the directory and all files inside the directory. Any one have any ideas??? Thanks. _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- 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 and GD
I am trying to create PNG images on the fly using the following code. if(file_exists($key)) { $diff = time() - filemtime($key); if($diff >= 600) { unlink($key); } } $im = ImageCreateFromPNG($value); $isCreated = imagePNG($im, $key, '80'); //error occurs here I recieve the following error on the line indicated above. imagepng: unable to open '/images/image1.png' for writing When I run phpinfo it shows PHP as begin copiled with GD support with PNG enable on GD (see below) GD Support enabled GD Version 1.6.2 or higher PNG Support enabled WBMP Support enabled The only other issue i could think of was permissions, but i have changed permissions to "rwx" all the way across for the directory and all files inside the directory. Any one have any ideas??? Thanks. _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- 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 and GD on a Redhat linux box
when i checked the 'debug.log' file after it broke, it said : gcc -o conftest -g -O2 [...snip ] -lXpm -L/usr/X11R6/lib/ -lX11 1>&5 /usr/bin/ld: cannot find -lX11 collect2: ld returned 1 exit status perhaps you had the X11 libraries even though you didnt have the actual server binaries. or do you think there's something else wrong? (either way, i'm dl'ing the X11 libs for the box right now, so in a few minutes, i'll know for certain) :) > -Original Message- > From: Brandon Orther [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 15, 2001 6:00 PM > To: PHP User Group > Subject: RE: [PHP] PHP and GD on a Redhat linux box > > > I do not believe this is the reason that you are having problems. I have > compiled GD on many Redhat machines without X11 > > Brandon > > -Original Message- > From: scott [gts] [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 15, 2001 2:44 PM > To: php > Subject: [PHP] PHP and GD on a Redhat linux box > > > i had compile problems for PHP + GD on a linux box. > > my best guess is that GD requires X11 support to > work properly, and in turn blows up the PHP > compile when GD cannot find the 'X11' library > > since the box is a server, bells and whistles like > Xwindows are not installed > > figured i'd share with anyone, in case others are having > the same problem compiling. > > -- > 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 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 and GD on a Redhat linux box
I do not believe this is the reason that you are having problems. I have compiled GD on many Redhat machines without X11 Brandon -Original Message- From: scott [gts] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 2:44 PM To: php Subject: [PHP] PHP and GD on a Redhat linux box i had compile problems for PHP + GD on a linux box. my best guess is that GD requires X11 support to work properly, and in turn blows up the PHP compile when GD cannot find the 'X11' library since the box is a server, bells and whistles like Xwindows are not installed figured i'd share with anyone, in case others are having the same problem compiling. -- 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 and GD on a Redhat linux box
i had compile problems for PHP + GD on a linux box. my best guess is that GD requires X11 support to work properly, and in turn blows up the PHP compile when GD cannot find the 'X11' library since the box is a server, bells and whistles like Xwindows are not installed figured i'd share with anyone, in case others are having the same problem compiling. -- 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]