Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"source contains no colors" despite following the instructions to import palette
#1
My system: Gimp 2.8.18 on Debian GNU/Linux 9 (stretch) 64-bit Gnome 3.22.2

Hi,

I try to import a color palette from a picture with RGB mode, following the instructions of rich2005 found in https://www.gimp-forum.net/Thread-How-to...83#pid6383

Quote:To get a palette from the original RGB image is different.
1. In the palettes dialogue, right click to import https://i.imgur.com/iF437h3.jpg
2. You get the 'Import' dialogue where you can select the image, and the number of colours https://i.imgur.com/qLPGDYU.jpg
3. Then again, hunt for that palette (Lenna-imported-5), right click, rename to something sensible, note the 500 colours in this one. https://i.imgur.com/QBZPIJX.jpg

Try as I might, I always get the message "source contains no colors", and the resulting imported color palette contains only very few colors, e.g., only two.

However, when I first convert the mode of the image to indexed I can import the full color palette containing all colors.

Did I get something wrong with "To get a palette from the original RGB image..."?

Is it impossible to import a color palette from an RGB image?

Thanks,

gnuimpcub

P.S. Since I work with layers, I have to work with RGB mode.

Just tried it with Gimp 2.8.16 on Microsoft Windows 10 Home Edition OEM, Version 1511 (Build 10586.164). Same result as with Linux Debian  Sad
Reply
#2
(02-28-2018, 07:48 PM)gnuimpcub Wrote: My system: Gimp 2.8.18 on Debian GNU/Linux 9 (stretch) 64-bit Gnome 3.22.2

Hi,

I try to import a color palette from a picture with RGB mode, following the instructions of rich2005 found in https://www.gimp-forum.net/Thread-How-to...83#pid6383

Quote:To get a palette from the original RGB image is different.
1. In the palettes dialogue, right click to import https://i.imgur.com/iF437h3.jpg
2. You get the 'Import' dialogue where you can select the image, and the number of colours https://i.imgur.com/qLPGDYU.jpg
3. Then again, hunt for that palette (Lenna-imported-5), right click, rename to something sensible, note the 500 colours in this one. https://i.imgur.com/QBZPIJX.jpg

Try as I might, I always get the message "source contains no colors", and the resulting imported color palette contains only very few colors, e.g., only two.

However, when I first convert the mode of the image to indexed I can import the full color palette containing all colors.

Did I get something wrong with "To get a palette from the original RGB image..."?

Is it impossible to import a color palette from an RGB image?

Thanks,

gnuimpcub

P.S. Since I work with layers, I have to work with RGB mode.

Just tried it with Gimp 2.8.16 on Microsoft Windows 10 Home Edition OEM, Version 1511 (Build 10586.164). Same result as with Linux Debian  Sad
Make sur e you click the "image" checkbox in the import dialog (and select the image). Otherwise you are importing colors from the current gradient.
Reply
#3
(02-28-2018, 08:25 PM)Ofnuts Wrote:
(02-28-2018, 07:48 PM)gnuimpcub Wrote: My system: Gimp 2.8.18 on Debian GNU/Linux 9 (stretch) 64-bit Gnome 3.22.2

Hi,

I try to import a color palette from a picture with RGB mode, following the instructions of rich2005 found in https://www.gimp-forum.net/Thread-How-to...83#pid6383

Quote:To get a palette from the original RGB image is different.
1. In the palettes dialogue, right click to import https://i.imgur.com/iF437h3.jpg
2. You get the 'Import' dialogue where you can select the image, and the number of colours https://i.imgur.com/qLPGDYU.jpg
3. Then again, hunt for that palette (Lenna-imported-5), right click, rename to something sensible, note the 500 colours in this one. https://i.imgur.com/QBZPIJX.jpg

Try as I might, I always get the message "source contains no colors", and the resulting imported color palette contains only very few colors, e.g., only two.

However, when I first convert the mode of the image to indexed I can import the full color palette containing all colors.

Did I get something wrong with "To get a palette from the original RGB image..."?

Is it impossible to import a color palette from an RGB image?

Thanks,

gnuimpcub

P.S. Since I work with layers, I have to work with RGB mode.

Just tried it with Gimp 2.8.16 on Microsoft Windows 10 Home Edition OEM, Version 1511 (Build 10586.164). Same result as with Linux Debian  Sad
Make sur e you click the "image" checkbox in the import dialog (and select the image). Otherwise you are importing colors from the current gradient.
Of course I do!
Reply
#4
Screenshot of import dialog, image canavas and layers list?
Reply
#5
As Ofnuts, a screenshot is often worth many words (but not always)

Using layers, the only thing I can think of is if sample merged is un-ticked

[Image: Xzjz8fi.jpg]
Reply
#6
(03-01-2018, 07:19 AM)Ofnuts Wrote: Screenshot of import dialog, image canavas and layers list?

Import Dialog top, Layers List bottom


Attached Files Thumbnail(s)
       
Reply
#7
Quote:P.S. Since I work with layers, I have to work with RGB mode.

That resulted in previous post about sample merged.

However, single layer and too many colours confuses Gimp. The blurb says:

" quote - GIMP will try to create a palette by spacing the specified number of colors even across the color range of the gradient or image."

If 256 colours is not sufficient (as you found RGB -> Indexed -> RGB works for 256)

Make a representitive selection - long and narrow and apply that in the dialogue. Increase the number of colours

[Image: Wm4pNj5.jpg]

Another way might be create a representive gradient and use, just off to try that.

---------some minutes later...............

Going via a gradient might be worth a go.

I use this script: http://silent9.com/incoming/scripts/samp...g-path.scm limited to 256 colours

There is another gradient maker in the gmic plugin if you look.

All in one screenshot: The gradient comes from a corner-to-corner path, so hopefully a representation of the 363775 colours in the image.

[Image: CgZpXlZ.jpg]
Reply
#8
Information 
Thank you so much for these detailed informations. What I wealth of possibilities I never knew of! Considering that I not only are learing these new aspects of Gimp but also are learning how to handle my new Wacom Intuos graphic tablet I will resort to this coloring technique, for the time being:

Convert an RGB picture to indexed, import the color palette, and use this palette with similar RGB pictures to create. 256 colors are more than enough for the beginning.
Reply
#9
Just to round things off:

While I go for a bespoke palette, limiting colours by using a selection or from a gradient.

Gimp does have provision for reducing colours.

The relevant bit from Gimp help is

...quote...Interval Even setting “Number of colors” to maximum, the number of colors can’t exceed 10000 in the palette. RGB images have much more colors. Interval should allow to group similar colors around an average and so get a better palette. This problem doesn’t exist with 256 colors indexed images: Interval to 1 allows picking 256 colors (this option is grayed out with more than 256 colors indexed palettes too).

To get a representative palette from your photograph, adjust the value of the interval until you get one that suits.

   
Reply
#10
(03-01-2018, 01:25 PM)rich2005 Wrote: Going via a gradient might be worth a go.

I use this script: http://silent9.com/incoming/scripts/samp...g-path.scm limited to 256 colours

First of all, thank you very much for your detailed and free Gimp tuition Smile

How do I use this script? I did put "sample-gradient-along-path.scm" in my HOME/.gimp-2.8/scripts/ directory, refreshed Filters > Script Fu, logged out, rebooted. However, when I try Windows > Dockable Dialogues > Gradients no Gradient Dialogue apears, nothing. How can I activate this dialogue?
Reply


Forum Jump: