[Skip to main content](#vessel-content)

#   Warning during gif thumbnails creation

##

- **[korzo](/forum/user/34428-korzo "View korzo's Profile")**
- [![korzo's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34428.png)](/forum/user/34428-korzo "View korzo's Profile") Topic Author
- [ Offline](/forum/user/34428-korzo)

Less More

- Posts: 193
- Thank you received: 76
-
-

11 years 10 months ago [\#186481](#186481) by [korzo](/forum/user/34428-korzo "View korzo's Profile")  *[Warning during gif thumbnails creation](/forum/3-bug-report/874225-warning-during-gif-thumbnails-creation#186481 "-- 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&#92;components&#92;com&#95;hikashop&#92;helpers&#92;image.php on line 813  I have warning &quot;Color index 255 out of range&quot; 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.")* was created by *[korzo](/forum/user/34428-korzo "View korzo's Profile")*

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

- [ ![piercing&#95;jazyku&#95;vibracni.gif](/forum/attachment/21671) ](/forum/attachment/21671 "...u&#95;vibracni.gif") [ ](/forum/attachment/21671?download=1 "...u&#95;vibracni.gif")
- [ ![piercing&#95;cinka&#95;bioplast&#95;MIXLOT-095.gif](/forum/attachment/21672) ](/forum/attachment/21672 "...MIXLOT-095.gif") [ ](/forum/attachment/21672?download=1 "...MIXLOT-095.gif")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84NzQyMjUtd2FybmluZy1kdXJpbmctZ2lmLXRodW1ibmFpbHMtY3JlYXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4080
-
- [](http://obsi.dev)
-

11 years 10 months ago [\#186532](#186532) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Warning during gif thumbnails creation](/forum/3-bug-report/874225-warning-during-gif-thumbnails-creation#186532 "-- 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&#92;components&#92;com&#95;hikashop&#92;helpers&#92;image.php on line 813  I have warning &quot;Color index 255 out of range&quot; 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.")*

Hi,

Thanks for the report ; it's the first time that I see someone using animated GIF in HikaShop ![:)](/media/kunena/emoticons/3.png ":)")
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 &gt;= 0 &amp;&amp; $transparentIndex &lt; $palletSize) { $trnprt_color = imagecolorsforindex($img, $transparentIndex);

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84NzQyMjUtd2FybmluZy1kdXJpbmctZ2lmLXRodW1ibmFpbHMtY3JlYXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.051 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
