Re: Sizing Problems
Posted: 2007-12-12T16:55:43-07:00
A couple of things....without the need for the identify, or all the calculations as IM does that for you!
PS; your "desc:" comment after this function also need updating!!! It is missleading to say that the function 'resizes image' when it is 'reading' or 'writing' images.
- Use -resize instead of -geometry
- Also -strip (or use -thumbnail resizing) to remove profiles.
- Read in images BEFORE resizing them.
- You don't need to check width and height of images for the resize, you can have IM resize images to fit a box, and never enlarge. By default IM will preserve the image aspect ratio.
Code: Select all
Exec("$config[convert] \"$image\" -thumbnail \"$size"."x"."$size>\" -quality \"$config[imagequality]\" \"$newimage\" ");
return file_exists($newimage);
PS; your "desc:" comment after this function also need updating!!! It is missleading to say that the function 'resizes image' when it is 'reading' or 'writing' images.