Page 1 of 1

Newbie

Posted: 2008-12-15T04:08:13-07:00
by danielmauch
Hello

I have a newbie question.

with this Code

Code: Select all

$width = 100;
	$height = 100;
	$convert_path="/is/htdocs/wp1126567_5VRRE5RC8Z/www/cgi-bin/convert";
	$image_path="/is/htdocs/wp1126567_5VRRE5RC8Z/www/db/test/";
	$size=$width."x".$height;

	$image  = $image_path."123.jpg";
	$image_small  = $image_path."123_klein.jpg";
	
	if(is_file($bild)){
		$command = "$convert_path -geometry $size -quality 75 $image $image_small ";
		echo $command ;
		exec ($command);
	}
the output is:

Code: Select all

/is/htdocs/wp1126567_5VRRE5RC8Z/www/cgi-bin/convert -geometry 100x100 -quality 75 /is/htdocs/wp1126567_5VRRE5RC8Z/www/db/test/123.jpg /is/htdocs/wp1126567_5VRRE5RC8Z/www/db/test/123_klein.jpg
but no small image in this folder???

any idea?

Daniel

Re: Newbie

Posted: 2008-12-15T08:12:04-07:00
by el_supremo
geometry doesn't do anything in that context.
I presume you're trying to make a thumbnail, so try this:

Code: Select all

 $command = "$convert_path $image -thumbnail $size -quality 75 $image_small ";
The -thumbnail will resize the image and also remove any profiles so that you get a small file size.

If you want to resize the image but not necessarily as a thumbnail, use -resize instead of -thumbnail.
Pete