Resize image without distortion |
[eluser]Ingonyama[/eluser]
Heres a small library I made a few weeks ago to resize images into a rectangle from the center. Example: http://img201.imageshack.us/img201/1236/examplel.jpg Initialize the class by passing in the following params: Code: $config['save_directory'] = './res/uploads/'; // where to save the resized image Then input the file path of the file you want to resize and the name you want to save it as Code: $file_path = '/path/to/image.jpg'; Comments, improvements, bug reports etc all welcome. |
Welcome Guest, Not a member yet? Register Sign In |