what i want to do is something like this: ``` define _CRT_SECURE_NO_DEPRECATE
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include "pnglib/png.h"
#pragma comment(lib, "libs/libpng16.lib")
void write_png_file(char* filename, int width, int height) {
FILE* fp = fopen(filename, "wb");
png_structp png_ptr = NULL;
png_infop info_ptr = NULL;
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
info_ptr = png_create_info_struct(png_ptr);
png_init_io(png_ptr, fp);
png_set_IHDR(png_ptr, info_ptr, width, height,
8, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE,
PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
png_write_info(png_ptr, info_ptr);
//somehow create the pixels and call the png_write_image function
png_write_end(png_ptr, NULL);
}```