mirror of
https://github.com/koreader/koreader.git
synced 2025-12-24 12:14:05 +01:00
use new FFI based mupdf API
This will use the new API where the Lua/C interface was used before and also drop usage of mupdfimg wrapper which is now implemented within the mupdf interface
This commit is contained in:
@@ -3,7 +3,6 @@ local Document = require("document/document")
|
||||
local Configurable = require("configurable")
|
||||
local Blitbuffer = require("ffi/blitbuffer")
|
||||
local lfs = require("libs/libkoreader-lfs")
|
||||
local Image = require("ffi/mupdfimg")
|
||||
local Geom = require("ui/geometry")
|
||||
local Device = require("ui/device")
|
||||
local Screen = require("ui/screen")
|
||||
@@ -148,7 +147,8 @@ function CreDocument:getCoverPageImage()
|
||||
self:loadDocument()
|
||||
local data, size = self._document:getCoverPageImageData()
|
||||
if data and size then
|
||||
local image = Image:fromData(data, size)
|
||||
local Mupdf = require("ffi/mupdf")
|
||||
local image = Mupdf:renderImage(data, size)
|
||||
ffi.C.free(data)
|
||||
return image
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user