mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Move render_mode support out of unireader.lua into djvureader.lua as it is djvu-specific.
Also added support for all other rendering modes handled by djvulibre. Also made the message print a human-readable description of the mode rather than just the number. Conflicts: djvureader.lua unireader.lua
This commit is contained in:
committed by
Qingping Hou
parent
3d291f52ac
commit
0d23340738
8
djvu.c
8
djvu.c
@@ -378,15 +378,9 @@ static int drawPage(lua_State *L) {
|
||||
DrawContext *dc = (DrawContext*) luaL_checkudata(L, 2, "drawcontext");
|
||||
BlitBuffer *bb = (BlitBuffer*) luaL_checkudata(L, 3, "blitbuffer");
|
||||
int render_mode = (int) luaL_checkint(L, 6);
|
||||
ddjvu_render_mode_t djvu_render_mode;
|
||||
ddjvu_render_mode_t djvu_render_mode = render_mode;
|
||||
unsigned char adjusted_low[16], adjusted_high[16];
|
||||
int i, adjust_pixels = 0;
|
||||
|
||||
if (render_mode)
|
||||
djvu_render_mode = DDJVU_RENDER_BLACK;
|
||||
else
|
||||
djvu_render_mode = DDJVU_RENDER_COLOR;
|
||||
|
||||
ddjvu_format_t *pixelformat;
|
||||
ddjvu_rect_t pagerect, renderrect;
|
||||
uint8_t *imagebuffer = NULL;
|
||||
|
||||
Reference in New Issue
Block a user