home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magazyn Amiga Shareware Floppies
/
ma57.dms
/
ma57.adf
/
aMiPEG05
/
source.lha
/
gray.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-04-22
|
1KB
|
51 lines
#include "video.h"
#include "proto.h"
/*
*--------------------------------------------------------------
*
* GrayDitherImage --
*
* Dithers image into 128 gray scales. Simply maps luminance
* value into 1 of 128 gray scale colors (divide by two, essentially).
*
* Results:
* None.
*
* Side effects:
* None.
*
*--------------------------------------------------------------
*/
void GrayDitherImage(unsigned char *lum, unsigned char *cr, unsigned char *cb,
unsigned char *out, int h, int w)
{
/*
int i, max = w*h/16;
for (i=0; i<max; i++) {
out[0] = pixel[lum[0]];
out[1] = pixel[lum[1]];
out[2] = pixel[lum[2]];
out[3] = pixel[lum[3]];
out[4] = pixel[lum[4]];
out[5] = pixel[lum[5]];
out[6] = pixel[lum[6]];
out[7] = pixel[lum[7]];
out[8] = pixel[lum[8]];
out[9] = pixel[lum[9]];
out[10] = pixel[lum[10]];
out[11] = pixel[lum[11]];
out[12] = pixel[lum[12]];
out[13] = pixel[lum[13]];
out[14] = pixel[lum[14]];
out[15] = pixel[lum[15]];
out += 16;
lum += 16;
}
*/
}