Re: how to scale down image using ImageMagick?
| From: | Wizaerd) | Date: | Thu, 19 Apr 2001 14:29:35 +0000 |
| Subject: | Re: how to scale down image using ImageMagick? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-49377@lists.php.net to get a copy of this message | ||
I use ImageMagik all the time for thumbnail creations... this doesn't resize the image, it creates a new image, a thumbnail... but the principle is the same....
$cWidth = 175;
$picture_src = "fullSize/somepic.jpg";
$thumb_dest = "fthumbNail/somepic.jpg";
$aImageInfo = getimagesize( $picture_src );
if( $aImageInfo[0] < $cWidth ) {
exec("convert -geometry $cWidth -colors 256 -colorspace yuv $picture_src $thumb_dest" );
}
At 08:59 AM 4/19/01 -0400, Noah Spitzer-Williams wrote:
Is there a way to install the GD library on windows nt systems? i can't get this thing to not scale it if its smaller than a certain width.... ""Steve Werby"" <steve-lists@befriend.com> wrote in message news:00ae01c0c848$8a802bb0$6501a8c0@workstation7... "Noah Spitzer-Williams" <noahsw@cyberdude.com> wrote:I have a bunch of pictures all in ranging filesizes and dimensions. Iwantto resize the ones that over 175 pixels wide to a 175 pixel wide picture however i want the height to scale down (ie. i dont want a really thin picture, i just want it to be what it would be if it were resized). ihavethis but i cant figure out how to just scale down the width: c:\progra~1\imagem~1\mogrify.exe -geometry 175x30! picture.jpeg the '!' forces those sizes to be used but obvoiusly i dont want theheightto be 30. i want it to be whatever it should be so the picture doesntlookflattened.I believe imagemagick has an option where you can specify a single dimension (x or y) and it will set that dimension accordingly and automatically scale the other dimension. This should be covered in the manual pages or --help output of the program. -- -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/ -- 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 -- 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