Skip to content

Commit 6f8354e

Browse files
committed
We need to convert back to host order in color_out
1 parent caec3f4 commit 6f8354e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

server/postpic.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ Datum color_out(PG_FUNCTION_ARGS)
312312
PPColor * color = (PPColor*) PG_GETARG_POINTER(0);
313313
while (colorspaces[i].name && color->cs!=colorspaces[i].oid) ++i;
314314
if (!(colorspaces[i].name)) i=0;
315-
sprintf(str, "%s#%x", colorspaces[i].name, color->cd);
315+
sprintf(str, "%s#%x", colorspaces[i].name, ntohl(color->cd));
316316
PG_RETURN_CSTRING(str);
317317
}
318318

@@ -617,9 +617,6 @@ PG_FUNCTION_INFO_V1(image_colorspace);
617617
Datum image_colorspace(PG_FUNCTION_ARGS)
618618
{
619619
PPImage * img = PG_GETARG_IMAGE(0);
620-
elog(NOTICE, "Returning enum for type %d, value %d", colorspace_oid, img->cspace);
621-
//return DirectFunctionCall2(enum_in, ObjectIdGetDatum(colorspace_oid),
622-
// ObjectIdGetDatum(img->cspace));
623620
return ObjectIdGetDatum(img->cspace);
624621
}
625622

0 commit comments

Comments
 (0)