Sorry, my misreading, the docs.
The docs are correct, but easy to misread if not careful. The ''<",
is supposed to work if you want to expand an image, not reduce it, to
my knowledge.
If you want to reduce the image, use ">" or ">^" depending upon
whether you want to reduce according to the larger or the smaller
image dimension and keep the aspect ratio preserved.
The docs says:
widthxheight<
Change dimensions only if both specified dimensions (meaning
WIDTHxHEIGHT) exceed image dimensions.
This means that it only changes the image dimension to expand to
WIDTHxHEIGHT if WIDTHxHEIGHT are both larger than the input image
dimension.
>Some help would be wonderful, the help files/references are usually really
>good for solving this quickly, but I can't seem to find a proper solution
>myself. The right push would be nice :-)
>
>On Sat, Mar 28, 2009 at 3:41 PM, David Di Biase <dave.dibiase at
>gmail.com>wrote:
>
>> Hi there,
>>
>>
>> I'm writing a script to pump random images to my users browsers (Flash
>> application). I'm doing this in PHP and converting usually 1k-2k image files
>> on the fly to a standard set of monitor sizes then caching them (to not kill
>> my server). This is the original line I was using:
>>
>> shell_exec("convert {$file} -filter Lanczos -quality 50% -resize
>> '{$browser[1]}x{$browser[2]}<' '{$file_generated}'");
>>
>> Say I set my dims to 1024x768 the file generated is ending up as 1900x1200
>> for some reason. My goal is to resize an image within the minimum set
>> dimension and keep the aspect ratio as is.
>>
>> The other question I have is, what's the best resize filter for large
>> images (of usually TIFF format)? I'm using Lanczos at the moment but I was
>> wondering if there was something better.
>>
>> Thanks,
>>
>> Dave
>>
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users