Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Batch adding a gif to images
#1
New user here, only been using gimp since oct this year. Using it to edit images for trading card bot on discord. Tried doing gif things with it and failed pretty miserably every time. Goal is to add a gif to the card images for a certain rarity. Is it possible to use the batch manipulator to insert the gif as a sort of overlay to the cards (used as a background). 

1. Have gif file that has a transparent back ground
2. card images
3. Use batch to bulk add the gif to multiple card images?


Sorry if i didnt explain it very well. Thanks for your time and help!
Reply
#2
Are your card images also gif files, these will be indexed colour which will cause problems, changed or missing colours when an overlay is added. You need to work on RGB mode for these batch processes. Your overlay can be converted to a png retaining transparency, the cards themselves png or jpeg.

--------
Edit: Horrible thought: Is the gif an animation? Still possible using sg-combine-bg.scm but a lot more work for a whole deck of cards.
--------
Two methods both using 'extra' scripts / plugins.

1. Open the cards as layers  File -> Open as Layers  Add the overlay image again `Open as layers' and move to the bottom of the layer stack. Now run a script sg-combine-bg.scm to add the bottom layer to all the rest. Next you have to export the layers back to separate images. Various scripts for this, a very versatile one attached, export-layers-plus.scm  Both those attached, unzip and put in your Gimp user profile C:\Users\"yourname"\AppData\Roaming\GIMP\2.10\scripts
Not a tutorial, not even a comprehensive demo but limited to one minute, so quick https://i.imgur.com/DKh6Eck.mp4

2. Using the BIMP plugin. There is a Windows installer see:  https://alessandrofrancesconi.it/projects/bimp/  Method (1) gets a bit cumbersome  for lots of layers. BIMP works on files already on disk. I have used it for 1000+ at a time. There is an option for adding a watermark, which is your image and exporting to a new file, preserving the originals. Another quick animation. https://i.imgur.com/GqiQChQ.mp4

There are other scripts and plugins, bound to be other suggestions.


Attached Files
.zip   overlay-export-scripts.zip (Size: 5.15 KB / Downloads: 87)
Reply
#3
(12-26-2020, 10:18 AM)rich2005 Wrote: Are your card images also gif files, these will be indexed colour which will cause problems, changed or missing colours when an overlay is added. You need to work on RGB mode for these batch processes. Your overlay can be converted to a png retaining transparency, the cards themselves png or jpeg.

--------
Edit: Horrible thought: Is the gif an animation? Still possible using sg-combine-bg.scm but a lot more work for a whole deck of cards.
--------
Two methods both using 'extra' scripts / plugins.

1. Open the cards as layers  File -> Open as Layers  Add the overlay image again `Open as layers' and move to the bottom of the layer stack. Now run a script sg-combine-bg.scm to add the bottom layer to all the rest. Next you have to export the layers back to separate images. Various scripts for this, a very versatile one attached, export-layers-plus.scm  Both those attached, unzip and put in your Gimp user profile C:\Users\"yourname"\AppData\Roaming\GIMP\2.10\scripts
Not a tutorial, not even a comprehensive demo but limited to one minute, so quick https://i.imgur.com/DKh6Eck.mp4

2. Using the BIMP plugin. There is a Windows installer see:  https://alessandrofrancesconi.it/projects/bimp/  Method (1) gets a bit cumbersome  for lots of layers. BIMP works on files already on disk. I have used it for 1000+ at a time. There is an option for adding a watermark, which is your image and exporting to a new file, preserving the originals. Another quick animation. https://i.imgur.com/GqiQChQ.mp4

There are other scripts and plugins, bound to be other suggestions.

Our cards are png/jpg. Its for a collectable card game bot for kpop idols. Trying to add (see attachment) over the cards or something similar. However during this process i just realized we only follow the same aspect ratio for our cards not the same sizes. So I dont think it will work out anyways. 

Thanks for your watermark idea. Might be able to use this for adding numbers and just forget about adding a shine to the cards. Thank you!


Attached Files Image(s)
   
Reply
#4
I think what you should look for are transitions. Seem to remember dedicated scripts for this. I will have a look around.

This one came from the gmic Gimp plugin, but it involved a bit of fiddling around as far as direction is concerned. Not really suitable for batch operations.

   
Reply


Forum Jump: