Resizing 640x448 (game footage)
- RadicalEd0
- Joined: Mon Jun 24, 2002 2:58 pm
That parts simple (okay so it took me a few days to figure out)
the user inputs 1.85:1 and wants the closest integer aspect ratio like 1.333 is to 4:3.
You simply take 185 and 100 and get the GCF, which is 5. Then divide 185 into 5 = 37 and 100/5 = 20
thus the integer aspect ratio of 1.85:1 is 37:20
when it comes to repeating decimals like 1.333 you have to go maverick and do something like 1.333 * 1440 and round the result and then get the gcf of that or something, I dont quite remember. I could post the code if you want, of course then you'd be ripping off my prog ;P
the user inputs 1.85:1 and wants the closest integer aspect ratio like 1.333 is to 4:3.
You simply take 185 and 100 and get the GCF, which is 5. Then divide 185 into 5 = 37 and 100/5 = 20
thus the integer aspect ratio of 1.85:1 is 37:20
when it comes to repeating decimals like 1.333 you have to go maverick and do something like 1.333 * 1440 and round the result and then get the gcf of that or something, I dont quite remember. I could post the code if you want, of course then you'd be ripping off my prog ;P
NMEAMV: PENIS
NMEAMV: IN
NMEAMV: YO
NMEAMV: MIXED
NMEAMV: DRINK
NMEAMV: IN
NMEAMV: YO
NMEAMV: MIXED
NMEAMV: DRINK
- klinky
- Joined: Mon Jul 23, 2001 12:23 am
- Location: Cookie College...
- Contact:
- RadicalEd0
- Joined: Mon Jun 24, 2002 2:58 pm
- klinky
- Joined: Mon Jul 23, 2001 12:23 am
- Location: Cookie College...
- Contact:
Yes, the only problem with your idea there is that there are hardcoded values in there. How would the program know which decimals to multiply by 100, and which to multiply by 1440? Also maybe there would be a black sheep in there that wouldn't work with either and needs something custom :ORadicalEd0 wrote:yeah, but weren't you asking how to make 1.333 go to 4:3 mathetically without having the program go 'hey, 1.333, that means 4:3'
~klinky
- RadicalEd0
- Joined: Mon Jun 24, 2002 2:58 pm
- klinky
- Joined: Mon Jul 23, 2001 12:23 am
- Location: Cookie College...
- Contact:
What if someone enters "1.33" or "1.3" ^_^ ?RadicalEd0 wrote:easy, if its more than a certain amount of decimal points make sure it uses the 1440 round method. I mean, nobody is going to input 1.986444818451 and expect a dead on accurate output :\
Only numbers after the decimal, that would mean it would try and use 100 instead of 1440.
^_^
~klinky
- klinky
- Joined: Mon Jul 23, 2001 12:23 am
- Location: Cookie College...
- Contact:
- RadicalEd0
- Joined: Mon Jun 24, 2002 2:58 pm
- klinky
- Joined: Mon Jul 23, 2001 12:23 am
- Location: Cookie College...
- Contact:
- Bushido Philosopher
- Joined: Mon Jun 25, 2001 7:19 pm
- Location: California