Skip to content

Instantly share code, notes, and snippets.

@widoyo
Created February 11, 2016 07:26
Show Gist options
  • Save widoyo/71c4ec8772de85bd397f to your computer and use it in GitHub Desktop.
Save widoyo/71c4ec8772de85bd397f to your computer and use it in GitHub Desktop.
def create_num(num):
'''
Script Pythonfu untuk Gimp
'''
img = gimp.Image(384, 160, 1)
pdb.gimp_context_push()
text_layer = pdb.gimp_text_fontname(img, None, 60, 0, num, -1, True, 142, 0, "Ubuntu Bold Italic")
pdb.gimp_layer_resize_to_image(text_layer)
layer = pdb.gimp_image_flatten(img)
pdb.file_png_save_defaults(img, layer, "/tmp/%s.png" % num, "/tmp/%s.png" % num)
for i in range(1, 101):
create_num(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment