Ask a Question related to PHP Development, Design and Development.
-
Brian S. Drexler #1
RE: [PHP] KEEP IMAGE RATIO
Leave out the height or width tag and it will keep the ratio by itself won't
it?
-----Original Message-----
From: John Manko [mailto:xerid@adelphia.net]
Sent: Wednesday, July 16, 2003 9:46 AM
Cc: [email]php-general@lists.php.net[/email]
Subject: Re: [PHP] KEEP IMAGE RATIO
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
Brian S. Drexler Guest
-
constrain aspect ratio
Hi. FH MX User 1.When I want to change the size of my object (w or h) here a logo on object panel,( even when I check "transform as unit" ) it... -
Locking aspect ratio to 4x3 NOT 16x9
Hi. I have developed a swf presentation at 4x3 ratio. Now it will be shown on a 16x9 machine and everything is stretched. Is their a way with code I... -
Images and Aspect Ratio Help Needed
I'm trying to figure out how to write some php code that will allow me to resize a .jpg image and maintain it's aspect ratio - any help or idea's... -
Locking a graphic ratio
Hello, I am wondering if there is a way to "lock" the aspect ratio of a graphic. As I move them around on my doucument the get squashed... -
Signal to noise ratio
Folks, I first want to thank all of the experts who have helped me along my way toward crawling up from the ranks of Perl initiate to Perl novice (I...



Reply With Quote

