Uploading GIF image: Color index 255 out of range

schildi - February 9, 2008 - 20:40
Project:Drupal
Version:6.0
Component:upload.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

Not sure about posting for the right component, but:

When creating an "image" node (uploading a GIF image crated by gimp) I get the following message three times:
warning: imagecolorsforindex() [function.imagecolorsforindex]: Color index 255 out of range in /drupal/includes/image.inc on line 251.

The UNIX command "files" reports e.g. for one the the GIF images:
GIF image data, version 89a, 3468 x 4571

See attached output of the gimp info-window for one of the GIF files

AttachmentSize
berg-info.png20.61 KB

#1

gumdrop - March 10, 2008 - 19:10
Version:5.6» 6.0

I am having the same problem with version 6.

Using it in combo with this module: http://drupal.org/project/ajax_pic_preview
and deleting the image will delete the whole user account!

#2

Bencoon - March 23, 2008 - 18:44

Using my vast range of nonexistent knowledge, I almost think this is a problem with GD, or whatever the image handler is that is used by default in drupal. I got the same error, but I have neither upload nor image even active on my install. Instead, I uploaded with a CCK imagefield.

Curious. Hopefully I can snag somebody to take a look through this.

#3

drewish - April 16, 2008 - 17:06
Status:active» won't fix

i'm pretty sure it's a bug in GD. i'd suggest grabbing the imagemagick toolkit that's included with the image module and giving that a try. if imagemagick gives you a similar error, re-open this.

#4

kenfar - April 16, 2008 - 19:28

imagemagik does take away that problem but then creates some of it's own. The biggest one being that when animated .gif files are uploaded and resized, they keep their animation but they leave a shadow behind as they go through their animations.

#5

Bencoon - April 23, 2008 - 01:11

I checked this out with a friend and it looks like it is a GD bug, due to a bad color index. If the transparency index is empty, GD chokes. Re-saving the image in a different image program fixed it for me.

 
 

Drupal is a registered trademark of Dries Buytaert.