next up previous contents index
Next: imageFilter Up: imageLoader Previous: The module   Contents   Index


Creating your own image type

This is not currently supported. It may be taken out, since C is unlikely to let us do it easily.

If you need to create a special type, here's how to do it. It's not recommended that you do it, for the following reasons:

What you need to do is quite simple. Declare your pixel like this:

struct mypixel {
unsigned char pad : 1; /* pad pixel */

unsigned char mark1 : 1; /* user defined marker 1 */ 

unsigned char mark2 : 1; /* user defined marker 1 */ 

unsigned char mark3 : 1; /* user defined marker 1 */ 

unsigned char isblock : 1; /* is part of a block? */ 

unsigned char ischar : 1; /* is part of a character? */ 

unsigned char private1: 1; /* internal field. */ 

unsigned char private2: 1; /* internal field. */  

/* your data goes here */

}; 

typedef struct mypixel MyPixel;

You should name your data field value.

More: struct size, etc.



root 2002-02-17