diff --git a/pdf.c b/pdf.c index a7f2f5944..1e5b82e38 100644 --- a/pdf.c +++ b/pdf.c @@ -86,6 +86,7 @@ static int newDrawContext(lua_State *L) { dc->zoom = zoom; dc->offset_x = offset_x; dc->offset_y = offset_y; + dc->gamma = gamma; luaL_getmetatable(L, "drawcontext"); lua_setmetatable(L, -2); diff --git a/reader.lua b/reader.lua index 47e45a5bf..23f18fa51 100755 --- a/reader.lua +++ b/reader.lua @@ -159,12 +159,6 @@ function setzoom(cacheslot) if optarg["G"] then print("gamma correction: "..optarg["G"]) cache[cacheslot].dc:setGamma(optarg["G"]) - else - -- there's still a bug in the DC initialization in C code, - -- so we disable gamma correction here explicitly - -- (it should be disabled by default) - -- TODO: correct bug in C API - cache[cacheslot].dc:setGamma(-1.0) end end