erzeugung vom ersten test image. farbuebergang rot und gruen.

This commit is contained in:
any
2026-07-19 19:14:42 +02:00
parent 22af45e1c9
commit ff8c8a2bdc
9 changed files with 20440 additions and 4 deletions
+17 -3
View File
@@ -1,6 +1,20 @@
#include <stdio.h>
#include <stdlib.h>
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image/stb_image.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image/stb_image_write.h"
#include "examples.h"
int main() {
int width = 1280;
int height = 780;
int channels = 4;
unsigned char *image = (unsigned char*)malloc(width * height * channels );
example_color(width, height, channels, image);
stbi_write_png("C:/Users/ary/CLionProjects/Raytracer/test.png", width, height, channels, image, width * channels);
free(image);
int main(void) {
printf("Hello, Worldd!\n");
return 0;
}
}