I want to crop 30px
from an image only from the bottom of it. I did some search and find some stuff, but when I tried it and save the image, the image got saved all black and I am not sure even if the image got cropped. I don't want to go back to the code that I have right now. So what is the fastest and easiest way to crop an image ?
Asked
Active
Viewed 215 times
-3

user1481850
- 238
- 3
- 13
- 24
-
you didn't mentioned what piece of code you're using. Can you please explain what code in PHP or any other you're using? – Hignesh Hirani Nov 02 '12 at 05:32
-
do you want me to post the code I used ? – user1481850 Nov 02 '12 at 05:33
-
What type of image? What have you tried? – adamdunson Nov 02 '12 at 05:34
-
not necessary all the time, but you can mentioned what library or available code you've used. If you want to show you code then don't paste in your question, please put it in pastebin.com and share link here. – Hignesh Hirani Nov 02 '12 at 05:35
-
png, jpg, and gif. ALl got saved black – user1481850 Nov 02 '12 at 05:35
-
Please check below link . [Crop image in PHP][1] [1]: http://stackoverflow.com/questions/1855996/crop-image-in-php – Nirav Ranpara Nov 02 '12 at 05:38
1 Answers
0
you can use the image crop function of the image library in codeigniter $this->image_lib->crop()
but before using image functions make sure that you load the image library first
$this->load->library('image_lib');
you can find this in docs here

Sahil Jariwala
- 243
- 2
- 5
- 19