Skip to content

Commit aed871f

Browse files
committed
Added support for grayscale images in image_new
1 parent 2e4520c commit aed871f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

server/postpic.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,9 @@ Datum image_new(PG_FUNCTION_ARGS)
273273
} else if(ccs == CS_CMYK.oid) {
274274
map = "CMYK";
275275
iinfo->colorspace = CMYKColorspace;
276+
} else if(ccs == CS_GRAY.oid) {
277+
map = "PPPI";
278+
iinfo->colorspace = GRAYColorspace;
276279
} else {
277280
elog(ERROR, "Unsupported colorspace %d", color->cs);
278281
/* Not needed, just to make the compiler happy */

0 commit comments

Comments
 (0)