Post by Lord_Azure » Wed Nov 29, 2006 12:41 am

I was having major problems with my images.

I looked into the coding and found that it doesnt support gif images.

Perhaps a resize for gifs would be helpful

New member

Posts

Joined
Thu Nov 23, 2006 2:16 am

Post by Daniel » Wed Nov 29, 2006 10:16 pm

I didn't nice this problem before. I will fix this for the next release!

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by chomp » Tue Feb 27, 2007 3:30 am

add a default case (return $image) to the resize function. not only do you have gif types, you got these as well...
      1 => 'GIF',
      2 => 'JPG',
      3 => 'PNG',
      4 => 'SWF',
      5 => 'PSD',
      6 => 'BMP',
      7 => 'TIFF(intel byte order)',
      8 => 'TIFF(motorola byte order)',
      9 => 'JPC',
      10 => 'JP2',
      11 => 'JPX',
      12 => 'JB2',
      13 => 'SWC',
      14 => 'IFF',
      15 => 'WBMP',
      16 => 'XBM'

New member

Posts

Joined
Sat Feb 24, 2007 7:19 am

Post by chomp » Tue Feb 27, 2007 3:33 am

FYI
Note: GIF support was removed from the GD library in Version 1.6, and added back in Version 2.0.28. This function is not available between these versions.
Last edited by chomp on Tue Feb 27, 2007 3:35 am, edited 1 time in total.

New member

Posts

Joined
Sat Feb 24, 2007 7:19 am

Post by hawkroberts » Thu Jul 26, 2007 3:24 pm

Here is a fix:

open upload/include/image.php

find the switch statement inside the resize function, in my version it's line:57

paste this code in line above case '2':

    case '1':
$source = imagecreatefromgif(DIR_IMAGE . $image);

        if (function_exists('imagecopyresampled')) {
          imagecopyresampled($destination, $source, $xpos, $ypos, 0, 0, $new_width, $new_height, $size[0], $size[1]);
        } else {
          imagecopyresized($destination, $source, $xpos, $ypos, 0, 0, $new_width, $new_height, $size[0], $size[1]);
        }

        imagegif($destination, DIR_IMAGE . $new_image);

        $image = $new_image;
        $width = @$height;

        break;

Should make the errors go away. :)

Newbie

Posts

Joined
Thu Jul 26, 2007 3:20 pm

Post by qfreddie » Mon Jan 07, 2008 5:32 pm

chomp wrote: add a default case (return $image) to the resize function. not only do you have gif types, you got these as well...
      1 => 'GIF',
      2 => 'JPG',
      3 => 'PNG',
      4 => 'SWF',
      5 => 'PSD',
      6 => 'BMP',
      7 => 'TIFF(intel byte order)',
      8 => 'TIFF(motorola byte order)',
      9 => 'JPC',
      10 => 'JP2',
      11 => 'JPX',
      12 => 'JB2',
      13 => 'SWC',
      14 => 'IFF',
      15 => 'WBMP',
      16 => 'XBM'
Where do you add this? I want SWF as product image option. Resize does not needed (would not be possible eighter of course), because i will make the SWF's manually to the correct size.

Newbie

Posts

Joined
Wed Nov 14, 2007 2:50 am
Who is online

Users browsing this forum: No registered users and 3 guests