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
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'
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'
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.
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.
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.
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.

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.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'
Who is online
Users browsing this forum: No registered users and 3 guests