djvu: enable color rendering (#3361)

* djvu: enable color rendering

* Bump base
This commit is contained in:
poire-z
2017-10-15 13:03:42 +02:00
committed by Frans de Jonge
parent 74242025ff
commit cfa5c8a941
3 changed files with 14 additions and 4 deletions

View File

@@ -35,6 +35,8 @@ local Document = {
-- whether this document can be rendered in color
is_color_capable = true,
-- bb type needed by engine for color rendering
color_bb_type = Blitbuffer.TYPE_BBRGB32,
}
@@ -337,7 +339,7 @@ function Document:renderPage(pageno, rect, zoom, rotation, gamma, render_mode)
size = size.w * size.h + 64, -- estimation
excerpt = size,
pageno = pageno,
bb = Blitbuffer.new(size.w, size.h, self.render_color and Blitbuffer.TYPE_BBRGB32 or nil)
bb = Blitbuffer.new(size.w, size.h, self.render_color and self.color_bb_type or nil)
}
-- create a draw context