[XBUP] XBUP - Extensible Binary Universal Protocol

» Documentation » Format » Visual

Format: Picture

Image data in the form of a bitmap image is one of the data traditionally stored using binary formats. The bitmap is usually two-dimensional array of pixels that determine the color values for each square or rectangular area.

If we look more deeply, it represents the value of the color intensity of light beams in the standard-defined parts of the spectrum of electromagnetic radiation, in the case of ordinary perceptual images of the human eye retina cells. It may also be a bitmap identifying different parts of the electromagnetic spectrum and other physical and non-physical variables. Examples can be roentgen or infrared image, spectral decomposition, population density per square meter and the others.

For the first option there will be defined classic bitmap image with the RGB palette, which will later be extended to express the meaning of using physical transformations and semantic information and extended for the possibility of wider use.

Bitmap Picture

The basis of the bitmap image is a bitmap. The latter is defined as the final two-dimensional array of pixels. Pixel is the basic unit of image information that expresses the intensity of the beam passing through / reflection area of the pixel. To determine the properties of electromagnetic radiation in the visible spectrum there are used for several types of values:

Assigned Catalog Index

There are index locations in catalog for basic formats.

Bitmap

Bitmap is a block which specifies that the data represent a bitmap image. It will contain data that define the colors.

Picture

Pixel Plane

Pixel plane is a flat screen canvas as of a matrix of rectangular pixels. Basic information is provided as a canvas size of the number of pixels in coordinates. On this plane there can then found a visible object.

Block RGBBitmap/PixelPlane

UBENatural - XSize - canvas dimension X
UBENatural - YSize - canvas dimension Y
UBPointer - ObjectLink
UBPointer - PixelRatio
..

Bitmap

One of the possible items is a bitmap

Block RGBBitmap/ItemBitmap

UBNumber - BitsPerPixel
UBPointer - PixelColorMap
UBNatural - Width
UBNatural - Height
UBIngeter - PositionX
UBInteger - PositionY
UBPointer - Orientation

Pixel Aspect Ratio

Aspect ratio determines the size of a pixel in relation to real space either for display on the screen, printer or other output device. Currently greater number of measure units is in common use, like for example meter, inch and so on.

Block will be defined after establishing blocks and units for length.

Frequency Map

This block determines the interpretation of one degree and the fundamental frequency, mainly using basic physical units. The aim is to enable the storage of bitmap images such as infrared or x-rays pictures and their automatic transformation into the visible range as needed. It shall be available later, after the declaration of physical blocks.

Palette

Palette is part of compression approach, which assigns a color pixel indices in the table.

It is basically an array, RGB or three numbers then other possible n-tuple types.

For images in true-color color depth, pixel values are directly interpreted as an RGB triplet.

Default Palette

One of the possible varieties for direct interpretation pixel bit values as RGB, or RGBA values. There are three, or four eight-bit values, ie red, green, blue and optional alpha channel. This is a variant of the frequency maps.

Block RGBPalette/DefaultRGBPalette
Block RGBPalette/DefaultRGBAPalette
Block RGBPalette/DefaultGScalePalette
Block RGBPalette/DefaultGScaleAPalette

Index Palette

Another possible option is defined using the palette table using RGB values, where bitmap entries are evaluated as an index into this table.

Block RGBPalette/RGBPaletteList

UBPointerList RGBIndexes

Those lists will link to the following items:

Block RGBPalette/RGBPaletteValue

UBRatio Red
UBRatio Green
UBRatio Blue
UBRatio Aplha

Table Palette

This palette is compression alternative of the previous one.

Block RGBPalette/RGBPaletteTable

UBNatural IndexCount
UBPointer PaletteData

PaletteData indicator refers to data block in which the sequence of RGBA values representing each palette color.

Array of Pixel Characteristics

Properties of each pixel is defined by a binary array that represents a compression of the wave properties using an optional algorithm. This may be a for example RGB, CMYK, YUI, or gray-scale. Furthermore, this data field itself may be further compressed using another algorithm, either losing or loss-less.

RGB Values Field

Examples of the field is the triplets of RGB values using byte ranges. octet of bits reflects the intensity of the resulting wavelengths of light of the given pixel. 0 - the zero level, 255 - the maximum intensity.

Plane of the Reflection and Absorption

This plane is primarily applicable for optically viewable data. This is a trinary function that returns two real values in the interval <0,1>, which determine the indexes of the reflection and absorption. Three input parameters specify coordinates and frequency. Physical meaning is plane that the frequency of the radiation targeting to the point F (X, Y) under any angled is divided into three parts, namely the part that passes, another of which is reflected and the part that is absorbed (absorbed).

- Version 0: Standard AbsorbingPlane

This basic form uses only a few basic features:

UBNatural - RatioIndex
UBNatural - FrequencyMapIndex

Inclusion of Existing Formats

This chapter tries to bring on the existing features of bitmap formats and provide the representation of equivalent properties in the protocol XBUP.

PNG Format

Portable Network Graphic is well documented, with no licensing restrictions, designed for general use on the Internet. Provides loss-less compression and is suitable for pipelining. Uses a scalable block-coding and fixed integers with “Network Byte Order” endianity.

PNG Critical Blocks

Critical blocks must always be present for the correct image processing. They are as follows:

PNG Image Header

IHDR block is requested to be present at the beginning of each PNG image. It has following values:

Width: 4 bytes
Height: 4 bytes
Bit depth: 1 byte
Color type: 1 byte
Compression method: 1 byte
Filter method: 1 byte
Interlace method: 1 byte

This block is covered as follows:

Width, Height are represented by the pixel plane block.

Bit depth is included as FrequencyMapIndex value.

Color type has following significant bits in PNG:

1 - palette used
2 - color used
3 - alpha channel used

Valid values are 0, 2, 3, 4, 6.

PNG Auxiliary Blocks

The following blocks are not an essential part of the picture, therefore they can be ignored, although they may have an impact on view.

The last three blocks are using the following standard keywords for text entry and fall into category of the information blocks about the origin of the document.

Title - Short (one line) title or caption for image
Author - Name of image's creator
Description - Description of image (possibly long)
Copyright - Copyright notice
Creation Time - Time of original image creation
Software - Software used to create the image
Disclaimer - Legal disclaimer
Warning - Warning of nature of content
Source - Device used to create the image
Comment - Miscellaneous comment; conversion from GIF comment

Todo: Compresion/Filter/Interlace jsou mutátory, viz. později…

PLTE Palette

See. Frequency map

IDAT Image data

Representováno jako normální datový blok

Blok: Standard Palette Bitmap