using java and jna I call a fonction : trace(potrace_ bitmap_s)
struct potrace_bitmap_s {
int w, h;
int dy; /* scanline offset in words */
potrace_word *map; /* pixel data, dy*h words */
};
typedef struct potrace_bitmap_s potrace_bitmap_t;
w, h: are width and height of a bitmap
in doc of library a found this
Here, potrace_word is an unsigned integer type defined in potracelib.h. It is usually equal to a native machine word (i.e., 32 bits on a 32-bit architecture). In the following explanation, we assume that the type potrace_word holds N bits.
A bitmap of dimensions w*h is divided, bottom to top, into h horizontal scanlines. Each scanline is divided, left to right, into blocks of N pixels. Each such block of N pixels is stored as a single potrace_word, with the leftmost pixels of the block corresponding to the most significant bit of the word, and the rightmost pixel of the block corresponding to the least significant bit of the word. Pixels that are “on” (or “black” or “foreground”) are represented by bit value 1. Pixels that are “off” (of “white” or “background”) are represented by bit value 0. If the number of bits in a scanline is not divisible by N, then the rightmost word of the scanline is padded on the right with zeros. The data for scanline 0 (the bottom-most scanline) begins at map[0]. The data for scanline 1 begins at map[dy]. The data for scanline 2 begins at map[2*dy], and so forth. Note that dy can be either positive or negative, depending on how an application wishes to lay out the image data in memory.
but I not understood how I can represente in java map.
public class Potrace_bitmap_t extends Structure{
int w, h; /* width and height, in pixels */
int dy; /* scanline offset in words */
map ??; /* pixel data, dy*h words */
}