B.2 Colour Image Coding Scheme
31.1023GPPCharacteristics of the Universal Subscriber Identity Module (USIM) applicationRelease 17TS
This coding scheme applies to coloured rectangular raster images. Raster image point colours are defined as references into a colour look-up table (CLUT), which contains a subset of the red-green-blue colour space. The CLUT in turn is located in the same transparent file as the image instance data themselves, at an offset defined within the image instance data.
Image data are coded as follows:
|
Byte(s) |
Description |
Length |
|
1 |
Image width = X |
1 |
|
2 |
Image height = Y |
1 |
|
3 |
Bits per raster image point = B |
1 |
|
4 |
Number of CLUT entries = C |
1 |
|
5 to 6 |
Location of CLUT (Colour Look-up Table) |
2 |
|
7 to K+6 |
Image body |
K |
Bits per raster image point:
Contents:
– the number B of bits used to encode references into the CLUT, thus defining a raster image point’s colour. B shall have a value between 1 and 8.
Coding:
– binary.
Number of entries in CLUT:
Contents:
– the number C of entries in the CLUT which may be referenced from inside the image body. CLUT entries are numbered from 0 to C-1. C shall have a value between 1 and 2**B.
Coding:
– binary. The value 0 shall be interpreted as 256.
Location of CLUT:
Contents:
– this item specifies where the CLUT for this image instance may be found. The CLUT is always located in the same transparent file as the image instance data themselves, at an offset determined by these two bytes.
Coding:
– Byte 1: high byte of offset into Image Instance File.
– Byte 2: low byte of offset into Image Instance File.
Image body:
Coding:
– each raster image point uses B bits to reference one of the C CLUT entries for this image instance. The CLUT entry being thus referenced yields the raster image point’s colour. The image body is arrayed as for the Basic Colour Image Coding Scheme, that is, starting with the highest bit of the first raster image point’s colour information.
Byte 1:
|
B8 |
b7 |
b6 |
b5 |
b4 |
b3 |
b2 |
b1 |
||||||||||||
|
… etc |
|||||||||||||||||||
|
… etc |
|||||||||||||||||||
|
… etc |
|||||||||||||||||||
|
… etc |
|||||||||||||||||||
|
… etc |
|||||||||||||||||||
|
Bit B-2 of raster point 1 CLUT reference |
|||||||||||||||||||
|
Bit B-1 of raster point 1 CLUT reference |
|||||||||||||||||||
|
Bit B (MSB) of raster point 1 CLUT reference |
|||||||||||||||||||
etc.
Unused bits shall be set to 1.
The CLUT (Colour Look-up Table) for an image instance with C colours is defined as follows:
Contents:
– C CLUT entries defining one colour each.
Coding:
– the C CLUT entries are arranged sequentially:
|
Byte(s) of CLUT |
CLUT Entry |
|
1-3 |
entry 0 |
|
… |
… |
|
3*(C-1) +1 to 3*C |
Entry C-1 |
Each CLUT entry in turn comprises 3 bytes defining one colour in the red-green-blue colour space:
|
Byte(s) of CLUT entry |
Intensity of Colour |
|
1 |
Red |
|
2 |
Green |
|
3 |
Blue |
A value of ‘FF’ means maximum intensity, so the definition ‘FF’ ’00’ 00′ stands for fully saturated red.
NOTE 1: Two or more image instances located in the same file can share a single CLUT.
NOTE 2: Most MEs capable of displaying colour images are likely to support at least a basic palette of red, green, blue and white.