diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2013-05-16 22:29:27 +0200 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-05-16 23:47:14 +0100 |
commit | 93bd1ff05bf315ed11b305d32eb510bd9a9a7e92 (patch) | |
tree | 10c2d846ed1193624a5119853bbc2ef9651e197c /apps | |
parent | 558ad511446cfa1d70891d9e7c9fb1ba942d3d9a (diff) | |
download | mupdf-93bd1ff05bf315ed11b305d32eb510bd9a9a7e92.tar.xz |
Add colorspace context.
To prepare for color management, we have to make the device colorspaces
per-context and able to be overridden by users.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/jstest_main.c | 2 | ||||
-rw-r--r-- | apps/mudraw.c | 4 | ||||
-rw-r--r-- | apps/pdfapp.c | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/apps/jstest_main.c b/apps/jstest_main.c index 7ef197b9..84d4dc9b 100644 --- a/apps/jstest_main.c +++ b/apps/jstest_main.c @@ -320,7 +320,7 @@ main(int argc, char *argv[]) pdfapp_init(ctx, &gapp); gapp.scrw = 640; gapp.scrh = 480; - gapp.colorspace = fz_device_rgb; + gapp.colorspace = fz_device_rgb(ctx); fz_try(ctx) { diff --git a/apps/mudraw.c b/apps/mudraw.c index dac5f42e..7efb9aae 100644 --- a/apps/mudraw.c +++ b/apps/mudraw.c @@ -815,9 +815,9 @@ int main(int argc, char **argv) } } - colorspace = fz_device_rgb; + colorspace = fz_device_rgb(ctx); if (grayscale || output_format == OUT_PGM || output_format == OUT_PBM) - colorspace = fz_device_gray; + colorspace = fz_device_gray(ctx); timing.count = 0; timing.total = 0; diff --git a/apps/pdfapp.c b/apps/pdfapp.c index 4320ba6a..78b00ed0 100644 --- a/apps/pdfapp.c +++ b/apps/pdfapp.c @@ -92,9 +92,9 @@ void pdfapp_init(fz_context *ctx, pdfapp_t *app) app->resolution = 72; app->ctx = ctx; #ifdef _WIN32 - app->colorspace = fz_device_bgr; + app->colorspace = fz_device_bgr(ctx); #else - app->colorspace = fz_device_rgb; + app->colorspace = fz_device_rgb(ctx); #endif } @@ -656,7 +656,7 @@ static void pdfapp_showpage(pdfapp_t *app, int loadpage, int drawpage, int repai if (app->image) fz_drop_pixmap(app->ctx, app->image); if (app->grayscale) - colorspace = fz_device_gray; + colorspace = fz_device_gray(app->ctx); else colorspace = app->colorspace; app->image = NULL; |