wip generator

This commit is contained in:
2025-06-04 14:22:48 +02:00
parent d0f59532ca
commit afa8d99024
4 changed files with 61 additions and 17 deletions
+3 -2
View File
@@ -85,8 +85,9 @@ void bmp_generate(unsigned short width, unsigned short height,
unsigned int data_length =
((unsigned int)width) * ((unsigned int)color_depth);
unsigned short y;
unsigned char *data_buffer = malloc(data_length);
unsigned char *line_buffer = malloc(bmp_data_line_length(width, color_depth));
unsigned char *data_buffer = (unsigned char *)malloc(data_length);
unsigned char *line_buffer =
(unsigned char *)malloc(bmp_data_line_length(width, color_depth));
for (y = 0; y < height; y++) {
generate_line(height - y - 1, data_buffer, data_length);
bmp_data_line(line_buffer, width, color_depth, data_buffer);