Saturday, 31 August 2013

how to deal with unexpected width and height

how to deal with unexpected width and height

I am currently using the following code to re size all images bigger than
800 x600 to the required size.
if (($width>800) and ($height>600))
{
WideImage::load($img_path.$name)->resize(800,
600)->saveToFile($img_path.$name);
}
However this won't work if for example an image has a width of 1024 and
height 559
I can use an or but I am not sure how to deal with resizing those Images .

No comments:

Post a Comment