[gameprogrammer] Re: Image sizing with constrain
- From: Robbert de Groot <zekaric@xxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Wed, 28 Jul 2004 12:04:35 -0400 (EDT)
Y/(400 - 70) = 300/400
Y = (300 * (400 - 70)) / 400;
Y = 247.5
So 247 or 248 pixels in the y will be needed.
The mathy formula.
X/Y = X'/Y'
which is just making the aspect ratios match.
--- Orel Beckford <force_ogb@xxxxxxxxx> wrote: > Hi
> I have'nt posted to this list for months, still
> reading you mails :-)
>
> I having a problem trying to resize an image with
> constrain. for example if I have an image which was
> 400 x 300 and I wanted to reduce the x of the image by
> 70, I need to calculate what the reduction of y
> should be, to keep the image looking like the the
> original but smaller, if I was to reduce the y by 70
> also the image looks a bit stretched, does anyone have
> the formular to work out how much to reduce the y by.
______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- Follow-Ups:
- [gameprogrammer] Re: Image sizing with constrain
- From: Robbert de Groot
- References:
- [gameprogrammer] Image sizing with constrain
- From: Orel Beckford
Other related posts:
- » [gameprogrammer] Image sizing with constrain
- » [gameprogrammer] Re: Image sizing with constrain
- » [gameprogrammer] Re: Image sizing with constrain
- » [gameprogrammer] Re: Image sizing with constrain
- » [gameprogrammer] Re: Image sizing with constrain
- [gameprogrammer] Re: Image sizing with constrain
- From: Robbert de Groot
- [gameprogrammer] Image sizing with constrain
- From: Orel Beckford