I'd like to ask for help with a problem I'm having issues solving: I'm trying to load an image as a new layer, move that layer to a set of coordinates, and then flatten the image so I can repeat the process.
To clarify, the coordinates in datalist and lines are for a big red X to place over a calendar based on the day. I've already gotten all of that working, but actually importing the X image into the working image and then flattening it is either saving as the default calendar (no Xs), or in this case bringing up an error:
Quote:
GIMP Error
Calling error for procedure 'gimp-image-insert-layer':
Item 'TheX.bmp' (561) has already been added to an image
for x in datelist:
new_image_layer = pdb.gimp_file_load_layer(image, "C:\\Users\\Bet-C\\Desktop\\TheX.bmp")
pdb.gimp_image_insert_layer(image, new_image_layer, None, 2)
pdb.gimp_layer_set_offsets(new_image_layer, int(lines[int(x/7)+2]), int(lines[int(x%7)+8]))
layer = pdb.gimp_image_flatten(image)
pdb.gimp_image_insert_layer(image, layer, None, 1)
I'm pretty sure its an easy solution, but I can't seem to parse through the examples online without confusing my own attempts.