Although this question ought to be migrated (it was at photo.stackexchange.com originally), I'll provide an answer here:
In order to create a pallette from an image, the image needs to have a color pallette to begin with -- you can't directly create a pallette from a full-color image. You'll first need to reduce the color depth to 8-bit (256 colors) or lower. You can fiddle around in the settings for the depth reduction, but I usually find optimized octree and nearest color give me something close to the original (with some posterization, of course). You might find that optimized median cut gives a better rendition for some pictures, but opting for dithering rarely gives you quite the pallette you want -- the target colors are often achieved by dithering rather than by direct rendering.
Once you have reduced the image from full-color to a palletted image, you should be able to save the pallette and use it on other images (the option should be available under the Image menu).