fix: the correct should be (*buffer)[3]
This commit is contained in:
+2
-2
@@ -10,7 +10,7 @@ static inline double linear_to_srgb(double x){
|
||||
return 1.055 * pow(x, 1.0/2.4) - 0.055;
|
||||
}
|
||||
|
||||
int buffer_normalize_srgb(double *buffer[3], int W, int H) {
|
||||
int buffer_normalize_srgb(double (*buffer)[3], int W, int H) {
|
||||
double max = 0;
|
||||
for (int j = 0; j < H; j++) {
|
||||
for (int i = 0; i < W; i++) {
|
||||
@@ -31,7 +31,7 @@ int buffer_normalize_srgb(double *buffer[3], int W, int H) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int write_png(char *filename, double *buffer[3], int W, int H) {
|
||||
int write_png(char *filename, double (*buffer)[3], int W, int H) {
|
||||
buffer_normalize_srgb(buffer, W, H);
|
||||
size_t bufsize = W*H*3;
|
||||
uint8_t *img = (uint8_t *)malloc(bufsize);
|
||||
|
||||
Reference in New Issue
Block a user