Skip to content

Instantly share code, notes, and snippets.

@dave-f
Forked from blooalien/CoderCat Example.jpg
Created October 4, 2017 12:40
Show Gist options
  • Save dave-f/44bc58858a26a6f3072b353454c69a78 to your computer and use it in GitHub Desktop.
Save dave-f/44bc58858a26a6f3072b353454c69a78 to your computer and use it in GitHub Desktop.
A simple gimp plugin to easily create cartoon speech bubbles.

speechbubble.py

A simple gimp plugin to easily create cartoon speech bubbles


License

  • Public Domain - This script is entirely too simple for me to care how it's used. Just enjoy it...

Installation

Simply copy or link this script into your "$HOME/.gimp-2.x/plug-ins/" folder and you should be good to go.


Usage

Create a selection the size and shape of the intended speech bubble, then look in the "Filters" menu under "Render". If all is well, there should be a menu entry labeled "Speech Bubble". Choosing that will open a dialog asking for a "Line Stroke Size". This is the number of pixels thick that the outline of the resulting speech bubble will be.


That's about it. Can't think of anything else right now. Enjoy...

#!/usr/bin/env python
# Title: Simple Speech Bubble
# Author: Bavarin Fleetfoot <[email protected]>
# License: http://creativecommons.org/publicdomain/zero/1.0/
from gimpfu import *
def speechbubble(image, drawable, radius):
gimp.context_push()
image.undo_group_start()
pdb.gimp_edit_fill(drawable, FOREGROUND_FILL)
pdb.gimp_selection_shrink(image, radius)
pdb.gimp_edit_fill(drawable, BACKGROUND_FILL)
image.undo_group_end()
gimp.context_pop()
register(
"speech-bubble",
"Cartoon Speech Bubble",
"Add a cartoon speech bubble using the current selection.",
"Bavarin Fleetfoot",
"Public Domain",
"2011",
"<Image>/Filters/Render/Speech Bubble...",
"*",
[
(PF_SPINNER, 'radius', 'Line Stroke Size', 2, (1,6,1))
],
[],
speechbubble,
)
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment