Vinh La Kiến

48 bundles
1 file8 months ago
4

Untitled

Grayscale

12345678910111213
void GrayscaleImage(int width, int height, int byte_per_pixel, byte*& data, double value) { for (int r = 0; r < height; r++) { for (int c = 0; c < width; c++) { int index = r * width + c; int offset = index * byte_per_pixel; *(data + offset + 0) = 0; *(data + offset + 1) = 0; } } }