mirror of https://github.com/koreader/koreader
Initial commit of picviewer.
Conflicts: Makefile extentions.lua pic.c reader.luapull/2/merge
parent
2b185961e8
commit
503c9b077d
@ -0,0 +1,27 @@
|
||||
/*
|
||||
KindlePDFViewer: JPEG Picture viewer abstraction for Lua
|
||||
Copyright (C) 2012 Tigran Aivazian <tigran@bibles.org.uk>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef _JPG_H
|
||||
#define _JPG_H
|
||||
|
||||
#include <lua.h>
|
||||
#include <lualib.h>
|
||||
#include <lauxlib.h>
|
||||
|
||||
int luaopen_pic(lua_State *L);
|
||||
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
require "unireader"
|
||||
|
||||
PICViewer = UniReader:new{}
|
||||
|
||||
function PICViewer:open(filename)
|
||||
ok, self.doc = pcall(pic.openDocument, filename)
|
||||
if not ok then
|
||||
return ok, self.doc
|
||||
end
|
||||
return ok
|
||||
end
|
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Loading…
Reference in New Issue