|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Constrain Proportions
I'm looking for some help on how contraint proportions work. I know when I want to resize a photo in Photoshop all I need to do is supply either the width or hieght and it will automatically determine the apporiate opposite size.
I have read through Ben's article on making thumbnails with PHP and GD, but it seems in that you have to supply both and then the script will determine the size. Any help would be awesome. Thanks in advance! Last edited by Brian Rosner : December 16th, 2002 at 06:32 PM. |
|
#2
|
|||
|
|||
|
to keep the proportion of the iamge, you need to get the propotion of the resize side to the original side. so you do
pro = orgina_h/resized_h pro would be say .09 to make it smaller, and 1.1 if you resized it bigger, then you times the width of the original image by the pro origina_w * pro this would give you your resized image, keeping the proportion. |
|
#3
|
|||
|
|||
|
PHP Code:
__________________
~ Joe Penn We work for free to help make this a valuable resource on the internet. Do you appreciate the help - did we provide help that will help you prosper and help that has contributed to sharpening your current skill set? Show your appreciation and purchase something from our Amazon Wishlist's - it's simple and a great way to say thank you. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Constrain Proportions |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|