dumping

vector and dumping

From what i know a vector is guaranteed to be continuous and i can write a chunk of memory to it and do send of fwrite with it. All i need to do is make sure i call .resize() to force it to be the min length i need then i can use it as a normal char array? would this code be correct v.resize(numOfElements); v.clear(); //so i wont get nu...

How to dump out an array of pixels as a png ?

I'm on MacOSX. I have read out an image, as char image[WIDTH][HEIGHT][3]; // row, col, rgb value Now, I want to dump it out as a png file. What is the quickest way to do this? ...