Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Load RGB fits image with GIMP Python API
#3
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)
Reply


Messages In This Thread
RE: Load RGB fits image with GIMP Python API - by ttt - 10-08-2024, 07:29 PM

Forum Jump: