| Member |
What it is |
| BmpFile.parse(bytes) |
Reads a BMP from a Uint8Array (or ArrayBuffer); throws if it isn't one. Damage doesn't throw: it
is reported in problems. |
| BmpFile.isBmp(bytes) |
Whether the bytes start with a BMP signature and a sensible DIB header size. |
| bmp.fileHeader |
{ offset, signature, signatureName, declaredSize, reserved1, reserved2, hotspotX, hotspotY, pixelOffset }.
|
| bmp.header |
The DIB header:
{ offset, size, variant, os2, width, height, topDown, planes, bitCount, compression, compressionName, imageSize, xPixelsPerMetre, yPixelsPerMetre, dpiX, dpiY, colorsUsed, colorsImportant, redMask, greenMask, blueMask, alphaMask, colorSpaceType, colorSpaceName, endpoints, gamma, intent, intentName, profileOffset, profileSize }
and the OS/2 2.x fields; what the variant lacks is null. os2 is true for an OS/2
2.x header (its compression numbers differ). |
| bmp.masks |
{ red, green, blue, alpha, source, length, channels: [{ name, mask, shift, bits, contiguous }] };
source is "header", "after the header" or
"default" (16 and 32 bits without masks). Null for indexed and 24-bit images. |
| bmp.colorTable |
{ offset, length, entrySize, expected, entries: [{ red, green, blue, reserved }] },
or null. |
| bmp.pixels |
{ offset, length, available, stride, rowBytes, rows, expectedSize, uncompressedSize, compressed, embedded, rle, padding, indexes, fourthBytes }.
rle:
{ encodedRuns, absoluteRuns, endOfLines, deltas, pixels, endOfBitmap, length, rowsCovered, overflows };
padding: { bytes, nonZero }; indexes:
{ highest, outside }; fourthBytes: { zero, full, other }.
|
| bmp.profile |
{ offset, length, kind: "embedded" | "linked", path, icc } for a V5 profile;
icc is its header
({ size, cmm, version, deviceClass, colorSpace, connectionSpace, signature, creator }).
|
| bmp.images · bmp.array |
Every bitmap
({ label, fileHeader, header, masks, colorTable, pixels, profile, headersEnd }):
one, or several in an OS/2 array or colour icon; the members above are those of the first. The
entries of an OS/2 array:
[{ offset, headerSize, next, displayWidth, displayHeight }]. |
| bmp.parts |
Every part in file order:
[{ kind, label, offset, length, image, fields: [{ name, offset, size, value, text }], problems }].
Kinds: array header, file header, DIB header,
masks, colour table, pixels, profile,
gap, trailing; image is the index in images.
|
| bmp.gaps · bmp.trailing |
[{ offset, length, zero }] between parts; { offset, length } after the
last part, or null. |
| bmp.problems · bmp.fileSize |
What is wrong with the file, as sentences; the number of bytes. |
| bmp.data(part) |
The bytes of a part (a view into the file). |
| BmpFile.SIGNATURES · HEADER_VARIANTS · COMPRESSIONS · COLOR_SPACES |
The names of the signatures, the header variants by size, the Windows compression values and the
colour space types. |