I have a photo that is 200*400. I wish to make it 200*200 by chopping off the bottom of the photo. At present I am attempting to use:
imagecopyresized($canvas, $piece, 0, 0, 0, 0 , $w, $h, $width, $height);
I assumed that I would just put the heights different and this would work but this just squashes it.
I can change where the x and y coords are but this just gives me black stuff around the picture.
Am I using the right function? If anyone can please help me i would very much appreciate it.
Cheers,
Westen
Crop photo
Moderator: General Moderators
Re: Crop photo
Are you trying this on a .jpg or a .gif? I found you get the black only on transparent .gifs. You could try changing it to a jpeg.
Re: Crop photo
I am using jpegs.
Regards,
Westen
Regards,
Westen