Here's A Mathematical Way To Resize An Image,
I'll Only Show How To REDUCE
As Making Larger Usually Results In "Ugly Results" :-(
This Isn't A "Tutorial" , Rather An "Explanation"
To Help You Understand The (Easy) Math
That Places Like Image Magick And Gifworks
Use In Their Resizing Tools.
~ If Anything, A Good Math "Pic-Me-Upper" :-)
Okey Doaky, Let's Begin Our PROPORTIONAL Math Lesson,
HAVE NOTHING TO FEAR,
Just Have A Calculator Handy !
Lesson Begin:
For Example, Let's Say
I Have An Large Image That I
Want To Make "Proportionaly" Smaller
and it's Width="264" and Height="268"
icecreamkid.jpg
(17 KiloBites)
& I'd Like To Make It's Width = About 90 Pixels
So Take It's Original Width Of 264 and DIVIDE By 90
...Whadda Ya Get?
Should Be 2.93 Right ?
Now Round It Off To 2.9
(this is the "Magic Number")
Then Divide The Original Image's Width (264) by 2.9
Which Equals 91.03 ...Round That Off To 91
As Your NEW Thumbnail Width
Simple So Far Huh ?
NEXT, Take The Original Image's HEIGHT of 268
and Divide IT By The Magic Number Of 2.9
and You Get 92.41
and Round That To 92
So Now You Have An Image That's width="91" height="92"
icecreamkid-THUMB.jpg
(Only 2 KiloBites)
Hope This Makes Sense !
Of Course Your "Magic Number" May Vary !
And You Can't Just Adjust The Dimentions
In Your Coding & Acheive The Byte Reduction
You NEED Two Images.
B A C K
|–| 0 /\/\ E