Make GIF background transparent - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions) +--- Thread: Make GIF background transparent (/Thread-Make-GIF-background-transparent) |
Make GIF background transparent - meetdilip - 08-10-2022 Hi, I have a .gif file with 27 frames, all white background. Is it possible to clear the white background from all the layers without manually handling them one by one? Thanks. RE: Make GIF background transparent - rich2005 - 08-10-2022 All depends on the animation. You will have to convert the gif from Indexed to RGB for the attached script c2a-all-layers then re-export as a gif. ...but that can introduce semi-transparency in some remaining colours. ...or non-Gimp using ImageMagick try (change -fuzz percentage as required, not even sure it is required for a gif ) Code: magick infile.gif -fuzz 10% -transparent white new.gif RE: Make GIF background transparent - meetdilip - 08-10-2022 Thanks, this is the base GIF While most of it worked well, it also removed the white inside the character. RE: Make GIF background transparent - rich2005 - 08-10-2022 Yes, such is life. Only 27 layers, Do each individually. Too high a fuzz value removes part of the panda. A small value leaves a border. RE: Make GIF background transparent - meetdilip - 08-10-2022 No problem. Thanks RE: Make GIF background transparent - Ofnuts - 08-10-2022 (08-10-2022, 01:46 PM)meetdilip Wrote: No problem. Thanks You can also use ofn-layer-tiles to change you animation into a single image, remove the background on that, and then split it back to 27 layers (also with ofn-layer-tiles). RE: Make GIF background transparent - PixLab - 08-11-2022 Did a try with the saulgoode overlay background http://chiselapp.com/user/saulgoode/repository/script-fu/wiki?name=sg-combine-bg Created a WHITE layer at the bottom ➤ mode color erase then run the scm ➤ overlay background on the gif it removes some white on the panda, but as a webp animation... not bad (a very slight transparency on the whites, though, but not bad) GIF [attachment=8478] WEBP RE: Make GIF background transparent - meetdilip - 08-11-2022 Got this one [attachment=8481] RE: Make GIF background transparent - rich2005 - 08-11-2022 Some time ago there was a similar question about batch removing backgrounds, I tried a little plugin isolate which worked fine on single images but not using BIMP. So, an adaptation for an animation (version 2) It is very linear, just what you do by, manually fuzzy select BG / grow selection a pixel / cut the selection. Since it fuzzy selects, the animation does need a plain color contiguous BG. The panda gif needs a bit of preparation. The original is optimized, so unoptimise. Increase the canvas size to make the BG contiguous. example: https://i.imgur.com/7WeIdfS.mp4 isolate-2.py attached (unzip and put in plugins folder) The usual guarantee, there is none [attachment=8486] RE: Make GIF background transparent - meetdilip - 08-11-2022 Works nice. Thanks |