is line 19 creating a new struct every time?
struct pixel **read_pixel_array(FILE *image, int pixel_array_offset, int width, int height) {
	struct pixel **ptr = malloc(sizeof(struct pixel*) * height);
	if (ptr == NULL){
		fprintf(stderr, "Error: Failed Malloc()");
	}
	
	for (int i = 0; i < height; i++){
		ptr[i] = malloc(3 * width); //sizeof(struct pixel) == 3
		if (ptr[i] == NULL){
			fprintf(stderr, "Error: Failed Malloc()");
		}
	}
	
	int error = 0;
	fseek(image, pixel_array_offset, SEEK_SET);
	for (int i = 0; i < height; i++){
		for (int j = 0; j < width; j++){
			error = 0;
			struct pixel p;
			error += fread(p.blue, 1, 1, image);
			error += fread(p.green, 1, 1, image);
			error += fread(p.red, 1, 1, image);
			ptr[i][j] = p;
			if (error != 3){
					fprintf(stderr, "Error: Failed fread.");
			}
		}
	}
	
	return ptr;
}