Leave out the height or width tag and it will keep the ratio by itself won't

-----Original Message-----
From: John Manko [mailto:xeridadelphia.net]
Sent: Wednesday, July 16, 2003 9:46 AM
Cc: [email]php-generallists.php.net[/email]

Ok, before you go responding with percentages, I should note this.

consider this:
Image1 : 100x100 (Ratio = 1:1)
Image2 : 100x200 (Ratio = 1:2)

Space available for display : 75x75

now, i can say "width=75% height=75%", but this will
only work for Image1, since Image2 will end up
as 75x150 (which clearly does not fit the 75x75 constraints)

now, if i specify "width=75 height=75", again, this works for Image1, but
not Image2, since the new Image2 ratio will be 1:1, with Image2 losing
1/2 of it's heigth ratio.

John Manko wrote:
> Ok, I'm surprised that this is not taken care of with HTML.
> I propose the following standard (but also looking for a PHP
> workaround if available)
> for the Img HTML tag:
> RATIO = Keep|Ignore, default Ignore
> < img width='x' height='y' RATIO='Keep|Ignore' >
> Where, RATIO=Keep will inlarge the image to a
> max WIDTH or HEIGHT (which ever comes first),
> without changing the perspective ratio.
> I don't want to have to use Photoshop or Gimp to
> ensure that the images a width=x or heigth=y will keep ratio.
> If anyone belongs to W3C, please consider this.
> Thanks

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php