11-10-2009, 11:44 PM | #1 |
Guru
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
|
My djvu viewer
This is a simple djvu viewer with GTK+ gui, not QT gui.
I was enlightened by Evince when I found Evince (capable of displaying djvu files) is written on GTK+, not on QT. After reading the source code, I know that Evince use Cairo to draw djvu page image on GdkWindow. I think it too compilcated for me, so I choose another way. I use ddjvu (an utility provided by djvulibre) to generate a page image and draw it on GtkWidget. It's much more simple to implement. The basic idea is using popen() to execute ddjvu and send output to GdkPixbufLoader. The benefit will be: 1. reduced lib size. No more huge QT libs. 2. reduced loading time and ram usage. Loading QT lib is burdensome for iLiad. To install: Just unpack the attachment to anywhere and a dir "mydjvuview" will emerge. Execute it from contentlister. Note: 0. I compiled the program agains GTK+2.14.7. I don't know if it works on common iLiad with GTK+2.6. Since I don't use any fancy GtkWidget, I think it should be working on your iLiad. If not, please tell me. 1. There is no file chooser currently. This app only open a specified sample djvu file bundled in the attachment. 2. To open your own djvu file, you have to modify "run.sh". If you want, you can modify registry.xml to enabl opening a djvu file from contentlister. 3. I found some djvu files do not conform to djvu standards. These files will cause the app crash without warning. It can be solved by using "djvm -c outfile infile" to convert a non-standard conforming file to standard-conforming. 4. This is only a demo. I am lazy to deal with the UI details in C. If I can call gdk_pixbuf_loader_write() in Lua script, I will make a lua version with more UI features. Last edited by ericshliao; 11-11-2009 at 12:38 AM. |
11-15-2009, 03:36 AM | #2 |
Guru
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
|
This is a djvu viewer in Lua script.
To install: 1. lgob-iliad-0.1.11 is requred. Find it here: https://www.mobileread.com/forums/showthread.php?t=36483 2. Unpack the attachment to anywhere and a dir "lua-djview_ddjvu" will emerge. Execute from contetlister. To use: Quite simple. There are four icons on the toolbar: open file, prev page, next page, quit. |
Advert | |
|
11-15-2009, 09:12 AM | #3 |
JSR FFD2
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
|
The gui starts, but you have to include libtiff (used by ddjvu):
Code:
./ddjvu ./ddjvu: error while loading shared libraries: libtiff.so.3: cannot open shared object file: No such file or directory |
11-15-2009, 04:55 PM | #4 |
Guru
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
|
Thanx for the feedback.
It's quite strange. The output format of ddjvu is pnm, not tiff. In fact, I don't use tiff anywhere in the script. Anyway, the attachment is the tiff lib. Unpack it to dir "lib". |
11-16-2009, 05:29 AM | #5 |
JSR FFD2
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
|
|
Advert | |
|
11-16-2009, 07:24 AM | #6 |
Guru
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
|
I think it's better to reserve the possibility to use tiff for the future.
Maybe I can expand this app to support multiple image formats. Last edited by ericshliao; 11-16-2009 at 07:44 AM. |
11-24-2009, 04:28 PM | #7 | |
Junior Member
Posts: 1
Karma: 10
Join Date: Nov 2009
Device: iliad reader
|
Quote:
I'm looking for the way how to read my djview books but couldn't run neither of djview goodies lua-djview_ddjvu is asking for libgio-2.0, however I couldn't find the right way to install it.. |
|
11-25-2009, 01:56 AM | #8 | |
Guru
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
|
Quote:
The command to install a .ipk package is: ipkg install filname.ipkg I don't remember if iLiad firmware has ipkg utility. If not, you have to install busybox first. |
|
10-17-2010, 09:28 AM | #9 |
Junior Member
Posts: 4
Karma: 10
Join Date: Oct 2010
Device: iLiad Book Edition
|
Hi all !
Just for n00bs like me:
To run this you need: lua5.1-iliad-1.5.0.ipk lgob-iliad-0.1.11.ipk from https://dev.mobileread.com/dist/hansel/luailiad/ to install these: ipkg install lua5.1-iliad-1.5.0.ipk ipkg install lgob-iliad-0.1.11.ipk Only then you can run prog from lua-djview_ddjvu.zip from the contentlister Last edited by Kelbern; 10-17-2010 at 09:48 AM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Java Djvu viewer - need SDK/KDK | zetareticuli | Kindle Developer's Corner | 13 | 08-03-2010 02:02 PM |
iLiad DJVU Viewer in Java on the iLiad | scotty1024 | iRex Developer's Corner | 61 | 07-14-2010 11:36 PM |
iLiad has a djvu viewer for Chinese fiimware ? | laozhang | iRex Developer's Corner | 0 | 04-26-2010 09:56 PM |
Problem: DJVU viewer and Firmware 2.12 | Magura | iRex | 1 | 03-23-2008 04:33 PM |
iLiad DJVU viewer? | riccioberto | iRex Developer's Corner | 5 | 01-06-2008 11:23 AM |