Hi Terry,

> I was just trying to document what I had done and discovered that
> palettes aren't really used directly in Indexed images.  Instead a
> Colormap is used:
>
> https://docs.gimp.org/2.8/en_GB/gimp-indexed-palette-dialog.html

As that page starts by saying, ‘Indexed Palette is a better name’.
They're the same thing.  The important part is that the bits
representing a pixel do not get fed to a digital-to-analogue converter,
like an RGB pixel, but instead are used to index a look-up table, LUT,
which contains the DAC's input(s).

This LUT is called a colourmap, by the X Window System, for example, or
palette, e.g. on RISC OS.  The key thing is it's the only colours
available and allows pixels to take less bits than if each had to hold
the LUT's entry.

> It seems that rather than creating a palette with 16 equally spaced
> grey scales between black and white, the Colormap is created by The
> Gimp using mapping to the colours found in the image when the image is
> processed using Mode - Indexed.

When using Image → Mode → Indexed... to change the image to indexed,
select ‘Use custom palette’ in the ‘Colourmap’ section, and pick the
palette which matches the LUT which the SSD1327 is using.  That's
probably the default one detailed on page page 33 of
SSD1327-datasheet.pdf, i.e. you want black to white with fourteen greys
in between.

Do this conversion as late as possible as it's lossy, like converting to
JPEG.  Do your other manipulations first.

Ideally, you'd instead select ‘Generate optimum palette’, limiting it to
sixteen colours having earlier desaturated it so there's no colour left
by using Colours → Desaturate → Desaturate... as Gimp can then pick the
sixteen greys which would best represent it.  You could then program the
SSD1327's LUT using command B8h to match on loading the image.  But
that's probably a bit advanced for the moment.  :-)

> According to this:
>
> https://docs.gimp.org/2.8/en_GB/script-fu-set-cmap.html
>
> This colormap can be set to the 'FG to BG' Palette that we created
> last night using 'Colors - Map - Set Colormap'

Don't use that.  It's for switching from one colourmap to another.  You
want Gimp to do the conversion to an indexed image with the correct
colourmap in mind.

I'd welcome correction from Gimp experts on the list.  :-)

-- 
Cheers, Ralph.

-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-09-01 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Reply via email to