Welcome Guest, Not a member yet? Register   Sign In
resize image problem
#1

[eluser]luffy[/eluser]
I'm using the $this->image_lib->resize() function.

When the upload pic width smaller than the config width, the pic will become bad.

eg, If the $config['width'] = 500, but the pic width only has 50px.

How should I do?
#2

[eluser]cereal[/eluser]
Do this:
Code:
list($width, $height, $type, $attr) = getimagesize($yourImage);
if($width =< 500)
{
  //too small
} else {
  //resize your image
}

bye




Theme © iAndrew 2016 - Forum software by © MyBB