Hi Terry,

> However, I think it has too many grey levels because I get a very
> washed out picture with the odd line on it.  The spec says 16 bit, but
> I think they mean 16 levels (needless to say the device came from
> China).

You originally wrote:
> The supplied image has the following properties (as provided by The Gimp:
>
>     Size in Pixels: 128 x 128
>     Color space:  Indexed color (16 colors)
>     Precision:  8-bit gamma integer
>     File Type:  Windows BMP image

So they've supplied an image with a colour palette of sixteen colours
where each pixel is an index into that palette from the interval [0, 16)
which takes four bits to represent.  This suggests the device is 16
colours.  Whether the palette is fixed, e.g. TTL-level RGB plus ‘dim’,
or able to be set is unknown.

> My image has these properties (I've tweaked it in The Gimp to get as close a 
> match as possible:
>
>     Size in Pixels: 128 x 95
>     Color space:  Grayscale
>     Precision:  8-bit gamma integer
>     File Type:  Windows BMP image

Your gray image is using eight bits to represent a level of grey in the
interval [0, 256), from black to white.

As I wrote initially,
> It's taking each pair of pixels in a row, which given it's an indexed
> BMP of sixteen colours are four bits each, and abutting them into a
> eight-bit byte.

It's only using the bottom four bits from each pixel so it's expecting
them to be an index into a palette.  My suggestion to use pic.convert()
was matching this.

Gimp should be able to convert to a 16-colour palette.

-- 
Cheers, Ralph.

-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-08-04 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