- Posts: 193
- Thank you received: 76
Warning during gif thumbnails creation
11 years 10 months ago #186481
by korzo
Warning during gif thumbnails creation was created by korzo
-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.6.3
-- Error-message(debug-mod must be tuned on) -- : Warning: imagecolorsforindex(): Color index 255 out of range in administrator\components\com_hikashop\helpers\image.php on line 813
I have warning "Color index 255 out of range" with some gif images on listing pages when thumbnail was created on page load.
I think is because imagecolortransparent($img) must be less than imagecolorstotal($img).
Gifs in question attached.
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.6.3
-- Error-message(debug-mod must be tuned on) -- : Warning: imagecolorsforindex(): Color index 255 out of range in administrator\components\com_hikashop\helpers\image.php on line 813
I have warning "Color index 255 out of range" with some gif images on listing pages when thumbnail was created on page load.
I think is because imagecolortransparent($img) must be less than imagecolorstotal($img).
Gifs in question attached.
Please Log in or Create an account to join the conversation.
11 years 10 months ago #186532
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Warning during gif thumbnails creation
Hi,
Thanks for the report ; it's the first time that I see someone using animated GIF in HikaShop
I made a fix which will be integrated int the next release.
Regards,
Thanks for the report ; it's the first time that I see someone using animated GIF in HikaShop
I made a fix which will be integrated int the next release.
Code:
if(in_array($extension,array('gif', 'png'))) {
$palletSize = imagecolorstotal($img);
if($transparentIndex >= 0 && $transparentIndex < $palletSize) {
$trnprt_color = imagecolorsforindex($img, $transparentIndex);
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Time to create page: 0.056 seconds