From ee49690964d61df9eb360f80a43cfb2ec77b9150 Mon Sep 17 00:00:00 2001 From: Deepanshu1114 <96886472+Deepanshu1114@users.noreply.github.com> Date: Tue, 18 Oct 2022 22:00:38 +0530 Subject: [PATCH] Create insertimageofQR.C --- insertimageofQR.C | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 insertimageofQR.C 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; +}