hello i have some images in my database and i want to display them, but i want to do :
if they have (w > 600 and/or h > 600)
{ resize the image to 50%}
if (not){ display normaly}
resize image
Moderator: General Moderators
Re: resize image
Can't you just use width and height in <img src='' width=''...> ?
Do you already know the size of the images?
Otherwise you will have to check with gdlib and then you use your if-condition.
And you can resize the width/height to 50% by dividing $width/$height with 2 and then you put those values into your img-tag
Where ist the problem?
Do you already know the size of the images?
Otherwise you will have to check with gdlib and then you use your if-condition.
And you can resize the width/height to 50% by dividing $width/$height with 2 and then you put those values into your img-tag
Where ist the problem?