Re: How to resize a jpeg?
| From: | Jim | Date: | Tue, 04 Dec 2001 22:07:37 +0000 |
| Subject: | Re: How to resize a jpeg? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-76609@lists.php.net to get a copy of this message | ||
Since you have GD and libjpeg installed now, you can perform transformations from the shell and hence, from php through the exec() command. Such as ...
exec("djpeg -scale 1/8 test.jpg | cjpeg -outfile test_thumb.jpg");
Here's a link to the man page for djpeg and cjpeg...
http://nodevice.com/sections/ManIndex/man0253.html
You may find better results adjusting these settings.
Be aware that exec() , if used improperly, can be a security hole if you use a user supplied variable for your exec argument.
Hi, after getting gd to work (thanx folks!) I am having some probs with the commands. The simple resize of a jpeg cant be that hard?! I have a 600x400 px jpeg and want to make a 80 x 60 out of it. Do I have to use imagecopyresized? And how. The result looks bad right now. Thanx, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net-- Jim Musil --------- Multimedia Programmer Nettmedia ------------- 212-629-0004 jim@nettmedia.com