I have an animated gif with transparent background, and I want to add a background image to all layers:
How can I achieve it without adding it to every layer individually?
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
In the GIMP it is possible with the multi-layers-merger extension from here:
(archived project) https://github.com/pixlsus/registry.gimp.org_static
(location of plugin extension within that project) https://github.com/pixlsus/registry.gimp.org_static/tree/master/registry.gimp.org/files/
Install the extension, then
Create a new image the same size as your animation, and put your background image in a single layer in the new image.
Go to Layers > Multi Layers Merger
Deselect all the options but "Use only active layer". This means to only merge the active layer of the background image.
Make sure the "Second Image to merge with" dropdown is the image with your animation frames in it
Click OK, and a new image should be created with your background behind each frame.
Here is how to do it in Photoshop. It may be helpful, I think.
- First open a stable picture/background that you want to put a gif on. This is mine: click.
- Open your gif. File > Import > Video Frames to Layers. /help image In the File Name type this: . /help image, find your gif and on this little window that pops up just click OK. You can skip this step if you have your gif already opened (because you were making it - how to make gifs tutorial you can find here).
- Window > Animation. /help image Something like this will show up.
- Now you work on the gif. Click on this little arrow with lines in the top right corner of animation window and pick Select All Frames. /help image
- Click on this arrow again and pick Copy Frames. /help image
- Go to your background. Click on the arrow and pick Paste Frames. /help image You must check Paste Over Selection when the little windows pops up. /help image
- Now you must ensure that the background picture is under ALL of the frames. To do that you must pick every frame one by one and in the Layers window you must check a visibility of the background - click on the little square and a little eye will appear. Here the visibility is off, here it’s on. Do it with all of the frames.
- Now it’s the time to move your gif. You must select all of the frames AND all of the layers (but WITHOUT the background picture!) and then click ctrl + t on your keybord and move the gif. /help image
- That’s all. Now to save the gif: File > Save For Web and Devices. /help image Remember that it must be smaller than 1 MB (1000 KB)