mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
RenderImage: factorize all image rendering and scaling code
New module RenderImage (alongside existing RenderText) to provides image rendering and scaling facilities. Uses MuPDF, but tries first giflib on GIF. Allows for getting all the frames from an animated GIF.
This commit is contained in:
@@ -270,7 +270,9 @@ function ReaderHighlight:onHold(arg, ges)
|
||||
end
|
||||
|
||||
-- check if we were holding on an image
|
||||
local image = self.ui.document:getImageFromPosition(self.hold_pos)
|
||||
-- we provide want_frames=true, so we get a list of images for
|
||||
-- animated GIFs (supported by ImageViewer)
|
||||
local image = self.ui.document:getImageFromPosition(self.hold_pos, true)
|
||||
if image then
|
||||
logger.dbg("hold on image")
|
||||
local ImageViewer = require("ui/widget/imageviewer")
|
||||
|
||||
Reference in New Issue
Block a user