Re: KEEP IMAGE RATIO
| From: | Reuben D. Budiardja | Date: | Wed, 16 Jul 2003 16:23:44 +0000 |
| Subject: | Re: KEEP IMAGE RATIO | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-155457@lists.php.net to get a copy of this message | ||
On Wednesday 16 July 2003 09:46 am, John Manko wrote:
> 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.
And I still don't see how your proposed method handles the problem you
mentioned above with Image2...
RDB
> 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
--
-------------------------------------------------
/"\ ASCII Ribbon Campaign against HTML
\ / email and proprietary format
X attachments.
/ \
-------------------------------------------------
Have you been used by Microsoft today?
Choose your life. Choose freedom.
Choose LINUX.
-------------------------------------------------