jyurkiw/SimpleBitmapLibrary — Issue #17: packed_array_length usage/state needs to be better documented
Author: jyurkiw
Created: 2011-10-28 20:01:20+00:00
State: open
Labels: Documentation

packed_array_length initializes to zero, and doesn't set itself until after you call pack_pixel(). This functionality is confusing and need to be either clarified, changed, or both.

Consider setting packed_array_length in resize_pixelArray() based on the passed rows/columns parameters and the empty pixel's write length rather than setting it in the pack_pixel_array() function. This would also help clear up any potential strange behavior stemming from something like...

```cpp
ofstream file;
pixel_array pa;

file.write(pa.pack_pixel_array(), pa.packed_array_length);
```