|
@@ -270,7 +270,7 @@ void prow2crow(float **prow, int nrow, char *palette, rgb_t **crow){ |
|
|
int applyUserPalette(float **prow, int nrow, char *filename, rgb_t **crow){ |
|
|
int applyUserPalette(float **prow, int nrow, char *filename, rgb_t **crow){ |
|
|
rgb_t *pal_row[256]; |
|
|
rgb_t *pal_row[256]; |
|
|
if(!readPalette(filename, pal_row)){ |
|
|
if(!readPalette(filename, pal_row)){ |
|
|
fprintf(stderr, "Could not read palette"); |
|
|
|
|
|
|
|
|
fprintf(stderr, "Could not read palette\n"); |
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -387,9 +387,9 @@ int ImageOut(options_t *opts, image_t *img, int offset, int width, char *desc, c |
|
|
if(!greyscale){ |
|
|
if(!greyscale){ |
|
|
prow2crow(img->prow, img->nrow, palette, crow); |
|
|
prow2crow(img->prow, img->nrow, palette, crow); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Apply a user provided color palette |
|
|
// Apply a user provided color palette |
|
|
if(CONTAINS(opts->type, Palleted)){ |
|
|
|
|
|
|
|
|
if(chid == Palleted){ |
|
|
applyUserPalette(img->prow, img->nrow, opts->palette, crow); |
|
|
applyUserPalette(img->prow, img->nrow, opts->palette, crow); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|