Welcome Guest, Not a member yet? Register   Sign In
Image cropping challenge
#2

[eluser]Colin Williams[/eluser]
1.) Use ratio to calculate proper dimensions of full photo.
2.) Subtract half of target dimension x from half of orignal image width. This is $config['x_axis']
3.) Subtract half of target dimension y from half of orignal image height. This is $config['y_axis']
4.) Note that one of these should be zero (or both if the image is perfectly rationed already)
5.) Crop the image, using the proper dimensions you calculated in Step 1 and the x_axis and y_axis you calculated in 2 and 3


Messages In This Thread
Image cropping challenge - by El Forum - 02-14-2009, 08:40 AM
Image cropping challenge - by El Forum - 02-14-2009, 10:11 AM
Image cropping challenge - by El Forum - 02-14-2009, 10:11 AM
Image cropping challenge - by El Forum - 02-14-2009, 10:14 AM
Image cropping challenge - by El Forum - 02-14-2009, 10:21 AM
Image cropping challenge - by El Forum - 02-15-2009, 10:09 AM
Image cropping challenge - by El Forum - 02-15-2009, 10:26 AM
Image cropping challenge - by El Forum - 02-16-2009, 12:22 AM
Image cropping challenge - by El Forum - 02-16-2009, 12:27 AM
Image cropping challenge - by El Forum - 02-16-2009, 12:32 AM
Image cropping challenge - by El Forum - 02-16-2009, 12:44 AM
Image cropping challenge - by El Forum - 02-16-2009, 12:46 AM
Image cropping challenge - by El Forum - 02-22-2009, 08:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB