Welcome Guest, Not a member yet? Register   Sign In
Image Lib - Resize failure
#12

[eluser]blender[/eluser]
[quote author="gRoberts" date="1207107432"]
Code:
$src = imagecreatefromjpeg($source);
[/quote]

I'm pretty sure the reason the gif won't work is because you are using imagecreatefromjpeg() instead of imagecreatefromgif().

I downloaded the image you attached and tried it using CI's library and it worked fine for me. I'm using CI v1.6.1. Here is my code:
Code:
$max_width = 600;
      $max_height = 400;
      // resize and copy to the image dir
      $config['image_library'] = 'GD2';
      $config['source_image'] = "$originals_directory/$image";
      $config['new_image'] = "$photo_directory/$image";
      $config['maintain_ratio'] = TRUE;
      $config['width'] = 600;
      $config['height'] = 400;

      $this->image_lib->clear();
      $this->image_lib->initialize($config);
      $this->image_lib->resize();

Have you verified that your "source_image" and "new_image" locations are correct and that you have write access to the new_image location?


Messages In This Thread
Image Lib - Resize failure - by El Forum - 03-29-2008, 11:36 AM
Image Lib - Resize failure - by El Forum - 03-29-2008, 03:20 PM
Image Lib - Resize failure - by El Forum - 03-30-2008, 03:33 PM
Image Lib - Resize failure - by El Forum - 03-31-2008, 02:49 AM
Image Lib - Resize failure - by El Forum - 03-31-2008, 03:06 AM
Image Lib - Resize failure - by El Forum - 03-31-2008, 03:18 AM
Image Lib - Resize failure - by El Forum - 03-31-2008, 03:26 AM
Image Lib - Resize failure - by El Forum - 03-31-2008, 03:34 AM
Image Lib - Resize failure - by El Forum - 03-31-2008, 03:42 AM
Image Lib - Resize failure - by El Forum - 03-31-2008, 07:14 AM
Image Lib - Resize failure - by El Forum - 04-01-2008, 04:37 PM
Image Lib - Resize failure - by El Forum - 04-02-2008, 11:44 AM
Image Lib - Resize failure - by El Forum - 04-02-2008, 01:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB