int main(int argc, char **argv) {
    for (int i = 0; i < height; i++){
            for (int j = 0; j < width; j++){
                    free(pixels[i]);
            }
            free(pixels);
    }
    return 0;
}
struct pixel **read_pixel_array(FILE *image, int pixel_array_offset, int width, int height) {
        int m = height;
        struct pixel **pointers = malloc(sizeof(struct pixel*) * m);
        for (int i = 0; i < m; i++){
                pointers[i] = malloc(sizeof(struct pixel*) * width);
                for (int j = 0; j < width; j++){
                        fseek(image, pixel_array_offset, SEEK_SET);
                        fread(&pointers[i][j], sizeof(struct pixel), 1, image);
                        pixel_array_offset = pixel_array_offset + sizeof(struct pixel);
                }
        }
        return pointers;
}



free the malloc memory in main with a for loop