diff --git a/insertimageofQR.C b/insertimageofQR.C new file mode 100644 index 0000000..b8333b6 --- /dev/null +++ b/insertimageofQR.C @@ -0,0 +1,20 @@ +#include + +#define STB_IMAGE_WRITE_IMPLEMENTATION +#include "stb_image_write.h" + +#define CHANNEL_NUM 3 + +int main() { + int width = 800; + int height = 800; + + uint8_t* rgb_image; + rgb_image = malloc(width*height*CHANNEL_NUM); + + // Write your code to populate rgb_image here + + stbi_write_png("image.png", width, height, CHANNEL_NUM, rgb_image, width*CHANNEL_NUM); + + return 0; +}