image_lib... how to scale image down and then create a thumb in one function? |
[eluser]inktri[/eluser]
For every uploaded image I want to first: scale it down to 500x500 and then create a thumbnail (a new thumbnail file is created) of the image. The below code is what I use, unfortunately the result is... a 500x500 image is generated, most of it's black, in the top left corner there is a 150x150 scaled down version of the original. If I only do one operation at a time (by commenting out the other) everything works. What am I doing wrongly? Thanks for the help. Code: // resize original to smaller 500 500
[eluser]wiredesignz[/eluser]
You need to reset the image library between tasks. Read the User Guide.
[eluser]mironcho[/eluser]
Hi inktri, use initialize() method instead of second load->library. Check this thread: http://ellislab.com/forums/viewthread/77795/ and image lib documentation: http://ellislab.com/codeigniter/user-gui...e_lib.html |
Welcome Guest, Not a member yet? Register Sign In |