PDA

View Full Version : Editing BIF files



Draksen
02-12-2001, 17:37
Is it possible to "edit" BIF files ?

Are they images ? (like .JPG or .BMP files)

------------------
http://www.geocities.com/draksen/doragon.jpg
Kazamatsuri clan
www.geocities.com/draksen (http://www.geocities.com/draksen)

Draksen
02-12-2001, 19:24
Informations about the BIF files:

Here are a few lines about the "BIFF" file format, the format used in
the XITE system. XITE - X-based Image processing Tools and

Environment
- is a free system from dept. of informatics, university of Oslo,
Norway. The format is quite simple, and I see no point in

describing
it in detail, but I would like to mention a few features that we are
satisfied with.

First of all, the format is only 3D

(unfortunately, it should be
N-dim.). It defines an image to be a sequence of 2D bands. Every band
may have its own size and pixel type,

which even allows the pyramide
representation to be used. There are also separate parameters for
positioning and magnification of each band.

Any amount of ascii text
may also be stored on the same file. The whole structure is read from
file in one call, and represented in one data

structure, something
like (in C):

IMAGE i;
i = read_image(filename);

Then the image i may be asked for number of bands:



fprintf("Number of bands: %d
", nbands(i));

It may also be indexed:

fprintf("Pixel value: %d
", i[y][x]);

The bands may be

handled separately:

BAND b;
b = i[1]; /* pointer to first band */
fprintf("Size of band: %d x %d
", xsize(b), ysize(b));


fprintf("Pixel value: %d
", b[y][x]);

The data structures represent pixel values as well as corresponding
information, thus only one

parameter must be transferred to functions.

The format defines a number of pixel types, but most functions are
only implemented for the byte

pixel type. The function can test the
arriving band to see if it has correct pixel type, something like:

if (pixeltype(b) !=

unsigned_byte) ...

A final feature is the sub-band mechanism. A sub-band is a _pointer_
to a rectangular subset of a band. When transferred

to a function, the
function does not have to distingwish between "normal" bands, and
sub-bands. To negate some rectangular part of a band

b1:

BAND b2;
b2 = sub-band(b1, x1, x2, y1, y2); /* define the rectangular subset of b1 */
negate(b2, b2); /* two parameters because

in general different
input and output are used, in this case
identical parameters are

allowed.
If b1 is now displayed, we see that the subset
is negated. */

To conclude: the

file format allows some important flexibility
(different size and pixel type in each band), and it is very easy to
write programs using the

format, as a "memory-format" is, defined and
the neccessary functions are written.

I will be glad to answer any questions.

Sincerely,
Tor

Lonnestad
Dept. of Informatics
University of Oslo
Norway
e-mail: tor@ifi.uio.no




------------------
http://www.geocities.com/draksen/doragon.jpg
[B]Kazamatsuri clan
www.geocities.com/draksen (http://www.geocities.com/draksen)

Draksen
02-12-2001, 19:26
... HEEEEEEEEEEELP !

------------------
http://www.geocities.com/draksen/doragon.jpg
Kazamatsuri clan
www.geocities.com/draksen (http://www.geocities.com/draksen)

High Voltage
04-30-2001, 11:01
I would like to know also http://www.totalwar.org/ubb/smile.gif

BanzaiZAP
05-01-2001, 01:53
This is the big thing that's frustrating many mod-makers. There are atually several different kinds of .BIF file, but the one described by Draksen (domo arigato, D-san) is the main one used in science exchanges, but there are other file types using ".bif" extensions, most of them are for compressing graphics or animations, and having the first "frame" be filled with information about how that animation is played.

In Shogun's case, that first code tells the system which frames are used for which animations. If you crack open the ".lbm" file, you'll see a bunch of pictures of the soldier in different positions. Several different running poses, fighting poses, dying poses... Anyway, those are then assembled into a series, and the code tells the games which series to play when actions occur.

Unfortunately, it looks like Creative Assembly has their own animation assembler, and without that specific program, we might not be able to make our own animations, and thus, our own grpahic unit mods. It's possible that a fan who is very good at code may find a way to open up the animations (hint hint). We don't need to recreate the animation sequences (though that would be better!) we only really need to find a way for it to reimport the individual frames from that .LBM (and we just redraw the figures).

I am thinking of starting a post that's just petition, so that we can find out how many players really want to make their own graphics. I do! I do!

-- B)