libsxbp  v0.27
Experimental generation of 2D spiralling lines based on input binary data.
Functions
backend_pbm.h File Reference

This compilation unit provides functionality to render a bitmap struct to a PBM image (binary version, stored in a buffer). More...

#include "../saxbospiral.h"
#include "../render.h"
Include dependency graph for backend_pbm.h:

Go to the source code of this file.

Functions

sxbp_status_t sxbp_render_backend_pbm (sxbp_bitmap_t bitmap, sxbp_buffer_t *buffer)
 Renders a bitmap image to a PBM image. More...
 

Detailed Description

This compilation unit provides functionality to render a bitmap struct to a PBM image (binary version, stored in a buffer).

Remarks
Reference materials used for the PBM format are located at http://netpbm.sourceforge.net/doc/pbm.html
Author
Joshua Saxby <joshua.a.saxby+TNOPLuc8vM==.com
Date
2016, 2017

Function Documentation

sxbp_status_t sxbp_render_backend_pbm ( sxbp_bitmap_t  bitmap,
sxbp_buffer_t *  buffer 
)

Renders a bitmap image to a PBM image.

Parameters
bitmapBitmap containing the image to render.
[out]bufferBuffer to write out the PBM image data to.
Returns
SXBP_OPERATION_OK on success.
SXBP_MALLOC_REFUSED on memory allocation failure.
Note
Asserts:
  • That bitmap.pixels is not NULL
  • That buffer->bytes is NULL