Add scaffold GIMP plugin.
[toast/gimp_passport.git] / gimp_passport_plugin.py
1 #!/usr/bin/python
2
3 from gimpfu import *
4 #import pdb
5
6 def create_passport(image, drawable, paper_height_mm, paper_width_mm):
7     # Note: for interactive sessions you can get the image via:
8     # image = gimp.image_list()[0]
9
10     # non_empty, x1, y1, x2, y2 = pdb.gimp_selection_bounds(image)
11
12     # pdb.gimp_image_find_next_guide(image, 0)
13     # pdb.gimp_image_get_guide_orientation(image, 6)
14     # pdb.gimp_image_get_guide_position(image, 6)
15     pdb.gimp_image_flip(image, 1)
16     return image
17
18
19 register(
20         "create_passport",
21         "Creates a printable passport image (contact sheet) from a photo",
22         "Select the face and call the plugin",
23         "Toastfreeware",
24         "Toastfreeware",
25         "2019",
26         "<Image>/Filters/Map/Create _Passport...",
27         "RGB*, GRAY*",
28         [
29                 (PF_INT, "paper_height_mm", "Paper height in mm", 100),
30                 (PF_INT, "paper_width_mm", "Paper width in mm", 150),
31         ],
32         [],
33         create_passport)
34
35
36 main()
37