- Messages
- 19,271
- Name
- Gary
- Edit My Images
- Yes
Writing the gallary software for my new site. Struggling to work out a simple equation, tired and been at it all night - brain now shutting down...
What I want to do is specifcy the original width and height of an image when I upload it, for example 1200 wide, 900 high.
I then want to work out Aspect Ratio based on a new width of 600.
So....is it as simple as this:
600 / original width x 100 = percentage of original size
old height x percentage pf original size = new height
Real example (1024 x 768 original size):
600 / 1024 x 100 = 58.59%
768 x 58.9% = 450
New image size = 600 x 450
Does this new size maintain aspect ratio with 1024 x 768?
Argh brain sore.
Gary.
What I want to do is specifcy the original width and height of an image when I upload it, for example 1200 wide, 900 high.
I then want to work out Aspect Ratio based on a new width of 600.
So....is it as simple as this:
600 / original width x 100 = percentage of original size
old height x percentage pf original size = new height
Real example (1024 x 768 original size):
600 / 1024 x 100 = 58.59%
768 x 58.9% = 450
New image size = 600 x 450
Does this new size maintain aspect ratio with 1024 x 768?
Argh brain sore.
Gary.
