Need to upload only resized image |
[eluser]sridhar2do[/eluser]
Hello, I want to upload only resized image, i don't want to upload other than that. is that possible to use only $this->image_lib->resize(); when using resize() image confused with $config['source_image'] without using do_upload(); please help me out
[eluser]rana[/eluser]
You can't first resize and then upload it to server. This is what you will have to do: * Upload original image. * Resize with image lib. * replace original image with resized one. Hope this make sense. To make the resize() function, in config, 'source_image' refers to the path of original uploaded image. To replace the original image, you have just ignore/set null to 'new_image' property. Also, set 'create_thumbnail' settings to false. Here is an example of image edit demo: CodeIgniter Image Manipulation Demo Example To read the full tutorial with all possible image manipulation options, go here: CodeIgniter Image Manipulation Tutorial With Code Example Let me know if still something isn't clear to you. Thanks.
[eluser]sridhar2do[/eluser]
Thank you so much, your explanation cleared my doubts. After running this code i will get back to you, thank you so much. |
Welcome Guest, Not a member yet? Register Sign In |