Frequently Asked Questions
оглавление | demo party в ex-СССР | infused bytes e-mag | новости от ib/news | другие проекты | письмо | win koi lat

следующий фpагмент (2)
LBM format.. ============ Deluxe Paint II LBM & IFF files ------------------------------- The Deluxe Paint LBM (and IFF) file header (40 bytes) has the following content: struct dp2 { char msg1[4]; "FORM" BYTE a3, a2, a1, a0; File length - 8 (read left to right) char msg2[8]; "ILBMBMHD" BYTE b3, b2, b1, b0; Length of header (read left to right) int width, length, xoff, yoff; BYTE planes, masking, compression, pad; int tansparent; BYTE x_aspect, y_aspect; int screenwidth, screenheight; } ; There may be a color map following a string "CMAP" in the file. After CMAP is the length of the color map (4 bytes, read left to right). The color map is byte triples (R, G, B) for each colors. The number of colors is 1 shifted left by planes (1 << planes). The actual picture data follows a string "BODY" and length of the picture data (4 bytes read left to right). The picture data is organized on a color plane basis for DP2, and on a pixel basis for DP2e (enhanced). Thus, for DP2: There are (width / 8) bytes per row. The data stream for each row consists of all the bytes for plane 0, followed by all the bytes for plane 1, etc. and for DP2e: There are (width) bytes/row, where each byte is a pixel color. If the data is uncomperessed (compression flag = 0), the data stream bytes are fed to the output unmodified. If it is compressed, it is run length encoded as follows: Get a code byte from the data stream. If the msb is 1, the 'count' is (1 - code), max = 127. Get the next byte from the data stream, and repeat it 'count' times. If the msb is 0, the 'count' is (1 + code), max = 128. Get the next 'count' bytes from the data stream.

Всего 1 фpагмент(а/ов) |пpедыдущий фpагмент (1)

Если вы хотите дополнить FAQ - пожалуйста пишите.

design/collection/some content by Frog,
DEMO DESIGN FAQ (C) Realm Of Illusion 1994-2000,
При перепечатке материалов этой страницы пожалуйста ссылайтесь на источник: "DEMO.DESIGN FAQ,".