How would I get pixels information based on a selection using GIMP (or any other software)?

For example, just like in PS I want to select a specific region of the image and have information about its pixels (and if can, compare it with another table/values/image selection)


  • 1
    Hi. Welcome to GDSE. What specific kind of pixel information? Do you mean the pixel dimensions of the selection? If so, click Windows > Dockable Dialogs > Pointer – Billy Kerr Feb 23 at 14:35
  • @BillyKerr I want to export a remap table (pixels map) to a file, how? – tqd97849 Feb 24 at 13:42
  • Do you mean the Colormap dialog? Windows > Dockable Dialogs > Colormap. – Billy Kerr Feb 24 at 13:51
  • @BillyKerr could be. Actually i want to export the colors to a .txt file. What i'm interested in is their values in hex (or anything at all!) – tqd97849 Feb 24 at 13:54
  • I've added an answer now that you have clarified what you actually want. – Billy Kerr Feb 24 at 14:21

Assuming you have an image in Indexed colour mode*:

  1. Click Windows > Dockable Dialogs > Palettes

  2. Find the "Colormap of image" you are currently working on

  3. Right click it and choose Export as > Text File

The resulting text file will contain all the colours in the palette in hexadecimal.

enter image description here

*Note: If the image isn't in Indexed colour, convert it by clicking Image > Mode > Indexed.

| improve this answer | |
  • Thanks so much!, but i don't understand. i opened the palette panel and i don't see the selection. – tqd97849 Feb 24 at 14:35
  • There is no "selection". The palette contains all the colours in the entire image. If you wanted just a small portion, I think you'd need to convert the mode to RGB: Image > Mode > RGB, crop the image to just the part you want to analyse, then do Image > Mode > Indexed, then find the palette and export it as text. Once finished you could just undo all the changes (Ctrl+Z) to reverse the crop, etc. – Billy Kerr Feb 24 at 14:37
  • YES!!! that's what i needed, thank you so much! – tqd97849 Feb 24 at 14:43

In Gimp

  • The Histogram dialog will tell you most everything you want to know about the pixels in the selection (or the whole layer if there is no selection). You can also obtain the count of pixels in a given value range.

  • The Pointer dialog will tell you the pixel value for the pixel under the pointer using various color models (RGB, HSV, LCh, LAB...)

  • The Sample points dialog does a similar thing simultaneously for up to four pre-positioned points.

| improve this answer | |
  • Is there a way to save the selection as pixel data? – tqd97849 Feb 24 at 13:44
  • What do you mean by "pixel data"? or is this the real question? – xenoid Feb 24 at 14:33
  • i'm really sorry for asking twice for same purpose. But i would like to keep the question in here – tqd97849 Feb 24 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.