[g]cc [flags] files -lsipp -lm [ libraries ]
The pointer buffer is a pointer to the image where each pixel is stored as three unsigned chars in the order red, green blue. Thus, the buffer is 3 * width * height bytes long.
The following functions operate on a Sipp_pixmap:
Returns a new Sipp_pixmap with the given size. The memory used is allocated using malloc(3).
Frees all memory associated to the Sipp_pixmap pm.
Set the pixel at (col, row) in pixmap pm to be the color (red, grn, blu). (0, 0) is upper left.
Write the pixmap pm to the open file file. The image is written in the Portable Pixmap format (ppm), the same format sipp is using when rendering to a file.
The pointer buffer is a pointer to the image where each pixel is a bit in an unsigned char. If the width field is not a multiple of 8, the last bits in the last byte of a row are not used. The most significant bit in each byte is the leftmost pixel. The entire buffer is width_bytes * height bytes long.
The following functions operate on a Sipp_bitmap:
Returns a new Sipp_bitmap with the given size. The memory used is allocated using malloc(3).
Frees all memory associated to the Sipp_bitmap bm.
Draw a line from (col1, row1) to (col2, row2) in the bitmap bm. (0, 0) is upper left.
Write the bitmap bm to the open file file. The image is written in the Portable Bitmap format (pbm), the same format sipp is using when rendering a line drawing to a file.