Re: KEEP IMAGE RATIO
| From: | Curt Zirzow | Date: | Wed, 16 Jul 2003 14:25:46 +0000 |
| Subject: | Re: KEEP IMAGE RATIO | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-155429@lists.php.net to get a copy of this message | ||
um.. sorry for the off topic discussion..
John Manko <xerid@adelphia.net> wrote:
> You will note that I did say that I was looking for a PHP solution to
> this, anyhow.
>
> >HTML isn't smart enough to figure that out and this is a PHP list, anyhow.
> >
>
> Thank you for the info. I still think that HTML should handle it.
There is no way that html can handle the situation. If you have an image
that is 100x200 and you want to fit it into a 75x75 square that has the
correct ratio, you are going to need to have some sort of border on the
top and/or bottom of the image.
Now if we leave it to the browser to handle this there are so many
different options to do when scaling down the image that it becomes
impossible to predict what will be displayed.
I say your alternate solution would be to write a image generating php
script that scales your image down to 75x75 yourself and reference that
image.
Good luck.
Curt.
--