Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 4,624
» Latest member: Josephmally
» Forum threads: 7,490
» Forum posts: 40,881

Full Statistics

Latest Threads
Open, save buttons on bot...
Forum: Gimp 2.99 & Gimp 3.0
Last Post: GrumpyDeveloper
8 hours ago
» Replies: 8
» Views: 2,875
edit_paste pastes at inco...
Forum: Scripting questions
Last Post: Ofnuts
8 hours ago
» Replies: 1
» Views: 70
Clone size randomly chang...
Forum: General questions
Last Post: oldschool1@runbox.com
Yesterday, 05:45 PM
» Replies: 2
» Views: 141
AI Gimp Plugins
Forum: Watercooler
Last Post: Zbyma72age
Yesterday, 03:31 PM
» Replies: 20
» Views: 53,293
Gimp closes automatically
Forum: General questions
Last Post: sallyanne
Yesterday, 05:50 AM
» Replies: 2
» Views: 186
AIGoR - Artificial Image ...
Forum: Other graphics software
Last Post: vitforlinux
07-16-2025, 11:10 AM
» Replies: 12
» Views: 3,795
Is This Possible ? Print ...
Forum: General questions
Last Post: sallyanne
07-16-2025, 07:47 AM
» Replies: 4
» Views: 189
Gimp Crash
Forum: Gimp 2.99 & Gimp 3.0
Last Post: rich2005
07-16-2025, 07:16 AM
» Replies: 1
» Views: 140
producing an image
Forum: Gallery
Last Post: MJ Barmish
07-15-2025, 06:37 PM
» Replies: 0
» Views: 106
GIMP 3.x: Editing a pdf
Forum: General questions
Last Post: rich2005
07-15-2025, 03:20 PM
» Replies: 1
» Views: 128

 
  Wizard advice requested: Struggling to write plug in that lists color data
Posted by: kmullinax - 01-31-2021, 09:16 PM - Forum: Scripting questions - Replies (2)

TL,DR:  Looking to quickly and automatically generate a list of each unique color in an image with pixel counts.

Hi everyone - 
I have been struggling to write this plugin for too long and don't typically ask for help, but despite my best attempts at reverse-engineering, I just can't seem to get my head wrapped around this one and am about to give up.  I thought I would try here as a desperate final plea.

I am making art from pixelated images, so I take RGB images and convert them to Indexed color 8-bit images using a specific custom palette of 120 colors representing the available manufacturer colors.  My custom palette has the RGB and manufacturer color codes in the palette (i.e. color "black" is C02).  I am trying to create a quick easy way to see how much of each color I will need before starting the art project so I can buy / have enough material on-hand.

Right now, this is how I have to accomplish it...  After converting the RGB image to the custom palette, I view the colormap and see each of the individual colors used.  By selecting-by-color for each item in the colormap, I can see the pixel count on the Histogram.  Then using the HTML Notation (HEX code) from the colormap, I find the corresponding color on my spreadsheet and then enter in the total pixel count for this project.  Then I do that for the next color until I've hit 120 or however many are in the image.  This is seriously time consuming.

Since all this data is so easily available in Gimp, I feel like it has to be possible to have a plugin do all this, and at this point I would be SO happy with any system that reduces the time it takes me.  I'm not a newbie to programming, but I'm not familiar with Python and I've attempted to create scripts in Python and Script-Fu to accomplish it, but there's a shocking lack of information about this online and so far I haven't been able to figure it out.  I'm to the point where I think some of this data is only accessible in C: and that's just not happening.

So for my final goal, the absolute best-case scenario is one where the plugin creates a .txt or .csv file that references the custom palette and lists each manufacturer code with the number of pixels.  Second-best is an exported file (or even a list in the Error Console) with the HEX code (or RGB codes) of each individual color with its pixel count.

Thanks in advance for any help!

Edit:  Honestly it seems like this information should be available via Colors->Info->Export Histogram... but for whatever reason the amount of info you can get from that export is seriously lacking.  I would be happy just to have that function work properly lol.  On another note completely, in the future, it would be great to have intelligent custom palettes in Gimp, so I could select-by-color from my palette, etc.

Edit #2:  Okay I discovered a very interesting piece of information... the colormap tab indexes the colors in descending order of proportion in the image.  That means the colormap must inherently know how many pixels of each color exist in the image, even though it doesn't display that info. 

Print this item

  Automatic image recoloring with palette
Posted by: riccds - 01-31-2021, 11:33 AM - Forum: General questions - Replies (2)

Hi all, let's say I have a normal image, but I want to recolor it by using only the colors in a custom palette. Is there a way to do that automatically?

Thanks

Print this item

  ImageMagic GUI
Posted by: denzjos - 01-31-2021, 11:25 AM - Forum: Other graphics software - No Replies

https://pypi.org/project/FotoKilof/
https://github.com/TeaM-TL/FotoKilof/releases

Print this item

  Adding Plugins in Windows 10
Posted by: meetdilip - 01-31-2021, 07:12 AM - Forum: Windows - Replies (4)

It was easy in Linux, the only thing to do was download the App image with plugins. Now I deeply miss Resysnthesiser and other plugins that came with the App Image. It would be nice to know where to find them and how to add it inside GIMP for Windows 10.

Print this item

  How to move docking panels to top/bottom side instead left/right
Posted by: StrikeAgainst - 01-30-2021, 03:58 AM - Forum: General questions - Replies (2)

I recently got a new screen which features turning to portrait orientation. Wanting to use GIMP (in single-window mode) with it, I now need to find a way to reposition the left- and right-side docking panels to the top and/or bottom side as they take up too much unneeded space and make it hard to work with wider layers. Temporarily switching to multi-window mode to reposition docks only attaches them back to the left or right side. I wasn't able to find any methods through online research so far.

Does anyone know how to do this? Or is there no way so that I have to resort to multi-window mode?

EDIT: I'm using GIMP 2.10 on Windows 10 x64

Print this item

  Cursor Locked NOT FloatingAnchor
Posted by: ScienceExpansion4PublicSchools - 01-29-2021, 10:54 PM - Forum: General questions - Replies (1)

Cursor Locked NOT FloatingAnchorMac 2.8.14
Mac 2.8.14
I want to  be able to move the **** layer (after I had just rotated then resized) & this *** cursor is making me curse....
Thanks folks!
And if you want YouTube views, PUT Errors like this as your thumbnails!!!
   

Print this item

Question Remove 1 letter from text without moving it.
Posted by: Marten - 01-29-2021, 06:37 PM - Forum: General questions - Replies (3)

Hey there,

I am pretty new to GIMP so I am not quite sure on how to approach this problem.
What I want is to remove the black letter from the layer without moving the rest of the text. So no spaces Smile

I tried giving it an alpha color but that doesn't seem to be possible.
[Image: kDac5]

Any help would be very much appriciated!

Print this item

  Changing brush size
Posted by: JEJEJEJ - 01-29-2021, 06:01 PM - Forum: General questions - Replies (7)

For the life of me I cannot find how to change the brush size. No search results on Google have the answer. Something so simple is so difficult.

Print this item

  Out of gamut corner?
Posted by: jediguitar101@yahoo.com - 01-29-2021, 01:13 AM - Forum: General questions - Replies (3)

I have zero knowledge on this "out of gamut" stuff...all I know is that the pink corner won't go away. I'm picking normal colors, under normal conditions...that I've done thousands of times...and this thing is showing up now. It JUST started. I have no idea why. And when I try to fill with it...it's a charcoal color. WTF is going on?

Print this item

  Editing Shapes
Posted by: jsin44 - 01-28-2021, 06:41 PM - Forum: General questions - Replies (2)

I'm trying to edit two existing shapes on my project and can't figure out how to do that (first time using the software). On the attached image I want to add a coloured border to the large black circle and adjust the size & dimensions of the white box that the red text is in. I am trying to select the layer and use the rectangle /ellipse tool to start editing but that only makes a new shape as far as I can tell. Any help would be appreciated.

Thanks



Attached Files Thumbnail(s)
   
Print this item