This script creates a new palette derived from the visible area or from the active drawable (layer or channel) of the current image.
Original image
Palette derived with the script
The peculiarity of the generated palette is that it is displayed in the Palette Editor as a faithful representation of the original image contents in the form of a rectangular array of suitable colors. The display area of the palette will feature even the same aspect ratio as the selected part of the image in case the color entries are horizontally and vertically scaled in such a way as to appear square.
Once installed, you can find this script in the image window menu under: "Image -> Translate into Palette...".
Allows you to decide whether to derive the palette from the visible area of the active image or from the active layer or channel, possibly by restricting the capture to the region overlapping the bounding box of the selection, if there is one in the image.
Here you can determine the way in which the transparent and semi-transparent areas that may be present in the image shall be represented in the resulting palette.
Lets you select the method of interpolation to use for translating the selected region into the array of discrete colors whereby the new palette will be rendered in the Palette Editor. The available methods are: None, Linear, Cubic, Lanczos.
Here you can set the name of the new palette, which otherwise, if leaving the text box empty, will automatically take the name of the source image.
Defines the number of columns used to display the new palette in the Palette Editor, while the number of rows (and consequently the amount of color entries) is automatically determined by requiring that the ratio of rows to columns is equal to the ratio between the width and the height of the captured area. Values can range from 1 to 64.
When this checkbox is activated, the generated palette will have no more than 256 colors, that is the upper limit for GIF files and indexed images. If necessary, the script will automatically reduce the specified number of columns (and the number of rows proportionally) in order to comply with such restriction.
Allows you to choose whether to save the palette in the 'palettes' folder of your personal GIMP directory or in the 'palettes' folder inside the GIMP's system directory. In the former case, unlike the latter, it will be possible to modify the generated palette in the Palette Editor as well as delete it by using the special button or the corresponding menu command available in the Palettes Dialog.
Here you can decide how to manage the last created palette, that is the one generated in the most recent execution of the script.
Note that the automatic deletion of the most recently generated palette is an useful strategy which avoids overloading the Palettes Dialog with an excessive amount of new palettes, such as those which would normally be created by executing the script several times during a same GIMP session.