View previous topic :: View next topic |
Author |
Message |
wardy Newbie
Joined: 13 Jun 2006 Posts: 2
|
Posted: Tue Jun 13, 2006 6:09 am Post subject: GIFS not cropping |
|
|
Hi Andy (great script)
I just have a problem trying to crop gifs? Everytnhings cropping great with other image types but the image stays as the original when using a gif. My code is basically:
$newfilename=$dest_folder.$resolution.$territory."/".$filename['name'];
copy($filename['tmp_name'], $newfilename);
$cc1 = new canvasCrop();
$cc1->loadImage($newfilename);
$cc1->cropToSize($width,$height,ccCENTER);
$cc1->saveImage($newfilename);
$cc1->flushImages();
have also added these lines to class file:
if ($ext == 'png' || $ext == 'gif') $saved = $func($this->_imgFinal, $filename);
else if($type == 'gif')
{
echo @ImageGIF($this->_imgFinal);
return true;
}
Any ideas/workarounds would be great as I need the option of cropping gifs
Cheers |
|
Back to top |
|
 |
amnuts Site Admin

Joined: 01 Sep 2002 Posts: 662 Location: East Sussex, England
|
Posted: Tue Jun 13, 2006 3:59 pm Post subject: |
|
|
Hi Wardy, and welcome to the board!
The first thing that springs to mind is that your installation of GD doesn't allow for the saving of gif images only the reading. Check out your phpinfo() output and look at the GD portion - you're looking for:
GIF Read Support - enabled
GIF Create Support - enabled
in the output.
If you have that and it's still not working, then I can email you a copy of the new cropping class as I have gif support built in (providing GD supports it, of course).
Andy |
|
Back to top |
|
 |
wardy Newbie
Joined: 13 Jun 2006 Posts: 2
|
Posted: Wed Jun 14, 2006 5:32 am Post subject: |
|
|
Hi Andy
I looked at phpinfo() and it says that both are enabled so I would be grateful if you could email me the new classes that support gifs
Cheers mate |
|
Back to top |
|
 |
amnuts Site Admin

Joined: 01 Sep 2002 Posts: 662 Location: East Sussex, England
|
Posted: Wed Jun 14, 2006 2:08 pm Post subject: |
|
|
It's in the post, as it were.  |
|
Back to top |
|
 |
wisnoe Newbie
Joined: 17 Jun 2006 Posts: 3
|
Posted: Tue Jun 20, 2006 3:42 am Post subject: |
|
|
hi, i have the same problem too  |
|
Back to top |
|
 |
amnuts Site Admin

Joined: 01 Sep 2002 Posts: 662 Location: East Sussex, England
|
Posted: Tue Jun 20, 2006 5:27 am Post subject: |
|
|
New version of the crop canvas is on its way to your email box! |
|
Back to top |
|
 |
amnuts Site Admin

Joined: 01 Sep 2002 Posts: 662 Location: East Sussex, England
|
Posted: Wed Jul 05, 2006 4:56 am Post subject: |
|
|
That version I emailed you still had a little issue with gifs. The version that's now available on the website is fully fixed and successfully tested to work with gifs. so if you haven't already, go and download a fresh copy.
Andy |
|
Back to top |
|
 |
|