On 26 August 2011 13:18, Zhenxing Zhou <aboutmatrix@xxxxxxxxx> wrote: > Hi All, > I read the code of GIMP v2.6.11 and I want to find the code > of gimp_image_get_colormap declared in libgimp\gimpimage.h. > gimp_image_get_colormap calls _gimp_image_get_colormap > in libgimp\gimpimage_pdb.c > _gimp_image_get_colormap calls gimp_run_procedure > ("gimp-image-get-colormap"... in libgimp\gimp.c > gimp_run_procedure calls gimp_run_procedure2 in libgimp\gimp.c > gimp_run_procedure2 calls gp_proc_run_write in libgimpbase\gimpprotocol.c > gimp_wire_write_msg calls (* handler->write_func) (channel, msg, user_data) > in libgimpbase\gimpwire.c > Then I lost the track of gimp_image_get_colormap. > Could you please tell me which code in which file "real" implement > the gimp_image_get_colormap function? > I'm a beginner in C language. Thank you very much. Hi, somewhat confusingly, the 'real' function has the same name, but is in app/core/gimpimage-colormap.c. It isn't very exciting to look at though, it just returns image->colormap. The pdb function that mangles the values around a bit is in app/pdb/image-cmds.c with the name image_get_colormap_invoker, generated from tools/pdbgen/pdb/image.pdb, where it is again called image_get_colormap (without gimp_). :) -- Mikael Magnusson _______________________________________________ Gimp-developer mailing list Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer