mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
cleanup: expand tab to 4 spaces
This commit is contained in:
@@ -2,31 +2,31 @@ local Document = require("document/document")
|
||||
local DrawContext = require("ffi/drawcontext")
|
||||
|
||||
local PicDocument = Document:new{
|
||||
_document = false,
|
||||
dc_null = DrawContext.new()
|
||||
_document = false,
|
||||
dc_null = DrawContext.new()
|
||||
}
|
||||
|
||||
function PicDocument:init()
|
||||
require "libs/libkoreader-pic"
|
||||
ok, self._document = pcall(pic.openDocument, self.file)
|
||||
if not ok then
|
||||
self.error_message = "failed to open jpeg image"
|
||||
return
|
||||
end
|
||||
require "libs/libkoreader-pic"
|
||||
ok, self._document = pcall(pic.openDocument, self.file)
|
||||
if not ok then
|
||||
self.error_message = "failed to open jpeg image"
|
||||
return
|
||||
end
|
||||
|
||||
self.info.has_pages = true
|
||||
self.info.configurable = false
|
||||
self.info.has_pages = true
|
||||
self.info.configurable = false
|
||||
|
||||
self:readMetadata()
|
||||
self:readMetadata()
|
||||
end
|
||||
|
||||
function PicDocument:readMetadata()
|
||||
self.info.number_of_pages = 1
|
||||
self.info.number_of_pages = 1
|
||||
end
|
||||
|
||||
function PicDocument:register(registry)
|
||||
registry:addProvider("jpeg", "application/jpeg", self)
|
||||
registry:addProvider("jpg", "application/jpeg", self)
|
||||
registry:addProvider("jpeg", "application/jpeg", self)
|
||||
registry:addProvider("jpg", "application/jpeg", self)
|
||||
end
|
||||
|
||||
return PicDocument
|
||||
|
||||
Reference in New Issue
Block a user