Answer
It depends if the light gray things are shadows or not.
They are shadows
Then a transparent background is not doable for this particular GIF. When you want a transparent background, you want to be able to show the picture over any background. In the picture above the shadows would be implemented as partially opaque pixels, that would slightly darken the pixels of the background. But in a GIF, there are no partially opaque pixels, they are fully opaque or fully transparent, so you can't have shadows. You can however change the background:
Prerequisites: Download and install:
Then:
- Remove the optimizations:
Filters>Animation>Unoptimize. This create a new image, you can close the source one. - Change image to full RGB:
Image>Mode>RGB Colors>Color to Alpha All layersand remove the background (color-pick, it should be #EEEEEE). Dark grey can darken to black, but don't panic.- Add a layer filled with white (or your new background color). Make it invisible
Image>Interleave layers>Interleave single layer (sprite mode)and select the white layer. This will create a new image, useFilters>Animation>Playbackto check it.- Filters>Animation>Optimize (for GIF)
- Export as GIF, don't forget to tick the animation checkbox, and to force all frames to 40ms (the optimization sets a longer interval)
They aren't shadows
So the light gray things will remain opaque, and we want to remove the background but prevent Color-to-alpha to change the light gray things into be partially opaque pixels. For a single layer, that means Select the background,Select>Growby two pixels, andColors>Color to Alpha` but this will be long for 68 layers. However there is a script that makes this a bit faster if used right:
Prerequisites: Download and install:
Remove the optimizations:
Filters>Animation>Unoptimize. This create a new image, you can close the source one.- Change image to full RGB:
Image>Mode>RGB - Set Gimp background color from the background color of your image (#eeeeee)
- Set the tools to the "By Color" selector.
- Click in a corner of the top layer, this should select the background
Layer>Erase backgroundshould make the background transparent.- Warm your fingers and do 67 times:
- Click a layer in the Layer list
- Clear near a corner in the image
- Ctr-F to reexecute
Layer>Erase background
Filters>Animation>Playbackto check- Filters>Animation>Optimize (for GIF)
- Export as GIF, don't forget to tick the animation checkbox, and to force all frames to 40ms (the optimization sets a longer interval)



No comments:
Post a Comment