10-08-2024, 07:29 PM
(This post was last modified: 10-08-2024, 07:32 PM by trandoductin.)
I played around with this and notice the function file_fits_load returns one image but it creates 3 in memory which you can use compose them as RGB.
So i got this to work
def afittest(image,layer,file):
image = pdb.file_fits_load(file,file)
#images set in memory but not returned because return only one but we have 3 new images
l = gimp.image_list()
redImage = l[len(l)-2]
greenImage = l[len(l)-3]
blueImage = l[len(l)-4]
#compose them
new_image = pdb.plug_in_compose(redImage,layer,greenImage,blueImage,redImage,"RGB")
pdb.gimp_display_new(new_image)
So i got this to work
def afittest(image,layer,file):
image = pdb.file_fits_load(file,file)
#images set in memory but not returned because return only one but we have 3 new images
l = gimp.image_list()
redImage = l[len(l)-2]
greenImage = l[len(l)-3]
blueImage = l[len(l)-4]
#compose them
new_image = pdb.plug_in_compose(redImage,layer,greenImage,blueImage,redImage,"RGB")
pdb.gimp_display_new(new_image)