Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

void Impala::Core::Feature::Bitmap::SaveGray2BitmapFile ( char *  file,
BYTE *  gray_data,
int  width,
int  height 
) [inline]

Definition at line 42 of file Bitmap.h.

References BYTE, and WriteRgbBufferToBitmap().

00043     {
00044         char filename[256];
00045         strcpy(filename,file);
00046         int bufsize = sizeof(BYTE)* width * height * 3;
00047         BYTE* buf = new BYTE [bufsize];
00048         memset(buf,0,bufsize);
00049         
00050         for (int i=0; i<width; i++)
00051         {
00052             for (int j=0; j<height; j++)
00053             {
00054                 buf[(i+j*width)*3+0] = gray_data[i+j*width]; // Blue
00055                 buf[(i+j*width)*3+1] = gray_data[i+j*width]; // Green
00056                 buf[(i+j*width)*3+2] = gray_data[i+j*width]; // Red
00057 
00058             }
00059         }
00060         
00061         WriteRgbBufferToBitmap(buf,width,height, filename);
00062         delete []buf;
00063     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:19:06 2011 for ImpalaSrc by  doxygen 1.5.1