But I did come up with some prototypes for our perusal. I'd love to post the recap at midnight UTC, but for that we would need full bot mode, I presume.
First up is what I call barlay, for the progress bar and importing the layers together.
Next is barlaytouch, which was an accident, but I thought it looked cool.
Datelay is a prototype only, getting the spacing right on different days would be a lot of ifs to deal with variable kerning.
Then we have the fun ccbarlay, for color changing. Took me awhile to figure out the the RGB values switched on me from 0-255 to 0-1.0
from collections import namedtuple
from gimpfu import *
import gimpcolor
# personal use of font thanks to https://chequered.ink/font-license/
def plugin_ccbarlay(image, drawable):
image = pdb.gimp_file_load("C:/Users/Games/Downloads/download (0).xcf", "/download (0).xcf")
display = pdb.gimp_display_new(image)
colr = 0.0
colg = 0.75
for items in range(1,25):
xlength = items * 15
pdb.gimp_context_set_foreground(gimpcolor.RGB(colr, colg, 0))
location = r"C:/Users/Games/Downloads/download ({}).png".format(items)
layer = pdb.gimp_file_load_layer(image, location)
pdb.gimp_image_insert_layer(image, layer, None, -1)
pdb.gimp_image_select_rectangle(image, 2, 220, 25, xlength, 20)
pdb.gimp_drawable_edit_bucket_fill(layer, 0, 340, 10)
layer = pdb.gimp_text_fontname (image, None, 315, 40, "0:00 UTC ^", 0, True, 30, PIXELS, "Withheld Data")
pdb.gimp_image_merge_down(image, layer, 1)
colr = colr + 0.03
colg = colg - 0.03
register(
"python-fu-ccbarlay",
"This loads layers with a progress bar",
"Very specific use case",
"author: DK",
"copyright: probably not",
"date: 2024",
"
"",
[
],
[],
plugin_ccbarlay)
main()
And saving the best for last, imo, what I call daylay. This one has the full dark earth at midnight utc. It was a fun challenge figuring out how to cycle through the 'letters'.
import gimpcolor
# personal use of font called moon_phases.ttf thanks to Curtis Clark
def plugin_daylay(image, drawable):
image = pdb.gimp_file_load("C:/Users/Games/Downloads/download (0).xcf", "/download (0).xcf")
display = pdb.gimp_display_new(image)
pdb.gimp_context_set_foreground(gimpcolor.RGB(58, 118, 222))
# loads layers and prints moondings u - t skipping z and a, so that the m full moonding happens at 0:00 utc
for items in range(1,25):
location = r"C:/Users/Games/Downloads/download ({}).png".format(items)
layer = pdb.gimp_file_load_layer(image, location)
pdb.gimp_image_insert_layer(image, layer, None, -1)
#these ifs use the proper fudge factor for the layer number conversion to ascii number
if items <= 5:
i = items + 116
alpha = chr(i)
layer = pdb.gimp_text_fontname (image, None, 365, 0, alpha, 0, True, 80, PIXELS, "day Phases")
pdb.gimp_image_merge_down(image, layer, 1)
if items >= 6:
i = items + 92
alpha = chr(i)
layer = pdb.gimp_text_fontname (image, None, 365, 0, alpha, 0, True, 80, PIXELS, "day Phases")
pdb.gimp_image_merge_down(image, layer, 1)
register(
"python-fu-daylay",
"This loads layers with a progress bar",
"Very specific use case",
"author: DK",
"copyright: probably not",
"date: 2024",
"
"",
[
],
[],
plugin_daylay)
main()
So while I had a lot of fun today, and know more about GIMP now, I think the biggest thing I realized is it looks like it's time to learn more about ImageMagick.
But I have the scripts if anyone has a cool font or color you think I might like.
Latest runtime: 279.1 seconds, and I had to put back the plug in I really wanted, and restart GIMP so that's around 15 seconds...Edit: spelling