Newbie

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
danielmauch

Newbie

Post 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
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Newbie

Post 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
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
Post Reply