Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex > iRex Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 11-10-2009, 11:44 PM   #1
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
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.
Attached Files
File Type: zip mydjvuview.zip (1.45 MB, 720 views)

Last edited by ericshliao; 11-11-2009 at 12:38 AM.
ericshliao is offline   Reply With Quote
Old 11-15-2009, 03:36 AM   #2
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
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.
Attached Files
File Type: zip lua-djview_ddjvu.zip (1.00 MB, 719 views)
ericshliao is offline   Reply With Quote
Advert
Old 11-15-2009, 09:12 AM   #3
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
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
hansel is offline   Reply With Quote
Old 11-15-2009, 04:55 PM   #4
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
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".
Attached Files
File Type: zip libtiff.so.zip (104.8 KB, 649 views)
ericshliao is offline   Reply With Quote
Old 11-16-2009, 05:29 AM   #5
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
Quote:
Originally Posted by ericshliao View Post
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".
Maybe you can build ddjvu withou tiff support?
hansel is offline   Reply With Quote
Advert
Old 11-16-2009, 07:24 AM   #6
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by hansel View Post
Maybe you can build ddjvu withou tiff support?
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.
ericshliao is offline   Reply With Quote
Old 11-24-2009, 04:28 PM   #7
indu
Junior Member
indu began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Nov 2009
Device: iliad reader
Quote:
Originally Posted by ericshliao View Post
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.
great work!
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..
indu is offline   Reply With Quote
Old 11-25-2009, 01:56 AM   #8
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by indu View Post
great work!
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..

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.
ericshliao is offline   Reply With Quote
Old 10-17-2010, 09:28 AM   #9
Kelbern
Junior Member
Kelbern began at the beginning.
 
Kelbern's Avatar
 
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.
Kelbern is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 03:34 PM.


MobileRead.com is a privately owned, operated and funded community.