
-----------------------------------
copthesaint
Sun Mar 31, 2013 6:42 pm

Creating BMP Image contex
-----------------------------------
So for fun I am making this image buffer in c++. Im at the point now where I want to take the information I have from my buffer and compile it into a 32 bit (or 24 bit to start) BMP Image then draw it. however I don't know where to start, I already understand bit shifting and my values in the buffer are all 8 bit each. I also don't want to use other people's libraries. Could anyone point me in a good direction? because right now I'm lost in Google, looking at other peoples code. Here is the code for my current project, btw, plz don't cry because I'm drawing every pixel at such a high level, I'm only doing this because I wanna see how I can and I am very aware of graphics languages: 

//ImageBuffer.h
#ifndef _IMAGEBUFFER_H
#define _IMAGEBUFFER_H

#include 
#include 
#include "Point2D.h"
#include "RGBA.h"
using namespace std;

#define PI 3.14159265

class ImageBuffer{
private:
	RGBA * buffer;
	unsigned __int32 size;
	unsigned __int32 width;
	unsigned __int32 height;
	unsigned __int32 depth;
	unsigned __int32 maxColor;
	bool alpha;
public:
	ImageBuffer(unsigned __int32,unsigned __int32,unsigned __int32, bool);
	~ImageBuffer();

	RGBA& operator

//ImageBuffer.cpp
#include "ImageBuffer.h"
#ifdef _IMAGEBUFFER_H
	ImageBuffer::ImageBuffer(unsigned __int32 w,unsigned __int32 h,unsigned __int32 d, bool a)/*: buffer(0), size (-1), width (w), height(h), depth(d),maxColor(1 