|
|
#1 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,246
Karma: 2818722
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1
|
A homebrewed program for viewing image archives (cbz, cbr,...)
CBZ and CBR files are unpacked within the program, and no external programs are required. To use the program, download the correct version for your device from the links at the bottom of this post. The 3XX version is for the older 301, 302 and 360 models. The Pro-360+ version is for all the rest of the PocketBook models that were released more recently (including the Touch). To use the program to view archives, you just need to unzip and copy the provided pbimageviewer-***.app file to system/bin/pbimageviewer.app on the device, and then edit the system/config/extensions.cfg file to make the system recognize the archive files as books. After that, you should be able to open .cbz or .cbr files in the library app. The following is what I added to my extensions.cfg file (note that the name of the app on each line should match with the name of the file it was copied to in the system/bin directory): Code:
zip:@ZIP_file:1:pbimageviewer.app:ICON_JPG cbz:@ZIP_file:1:pbimageviewer.app:ICON_JPG rar:@RAR_file:1:pbimageviewer.app:ICON_JPG cbr:@RAR_file:1:pbimageviewer.app:ICON_JPG tar:@TAR_file:1:pbimageviewer.app:ICON_JPG tar.gz:@TAR_file:1:pbimageviewer.app:ICON_JPG tgz:@TAR_file:1:pbimageviewer.app:ICON_JPG tar.bz2:@TAR_file:1:pbimageviewer.app:ICON_JPG tbz2:@TAR_file:1:pbimageviewer.app:ICON_JPG You can also copy the pbimageviewer.app file to applications/ and then use it via the Applications tab to look at already existing image folders. ------ Here is part of the announcement for the first release, for historical purposes: I had been grumbling about needing to convert manga and comics to PDF or EPUB for reading on my 902, and finally decided to do something about it. I found a nice image viewing program written by Michail Polubisok (aka Dirondin) that could be used to view images in a directory. I added code to automatically unpack archives of images (in ZIP, RAR and TAR formats), and then since these archives were like books, I added many Inkview book features to the software as well (like Table of Contents and Page Selector for navigation, changing orientation, saving state and configuration options,...). The unpacking of archives is rather crude (it relies on the external programs unzip, unrar and tar), but for a first version, I find the program to be very useable even at this stage. I've contacted Michail to help improve it, however he is very busy with schoolwork and a job right now, so I've decided to release the program as is and get some feedback on its useability before working on improvements to the archive handling code. There is currently no support for a touchscreen, mostly because I don't have one. However, I'm sure the stylus would be very handy for panning zoomed-in images, and I expect it'll be added later if someone with a touch device wants to help with that. I've also written the menus to be internationalizable, so if anyone wants to help provide translations for other languages, they would be more than welcome. I've put together a zip file with the necessary programs for both the newer Pro (and 360+) devices and for the older 30X/360 devices, as well. The latter are completely untested by me and may not even work, but I live in hope. I'll provide a link to the source code and unrar/unzip packages when I have that ready sometime soon. ------ Edit: Sorry, the first version of the Pro zip file had a version of unrar that wouldn't work on the devices. I re-uploaded the zip with a working version. Edit 2: Uploaded new versions with some bug fixes. Edit 3: Added custom zoom level feature requested by @dtanis. Edit 4: Added configuration item to force unpacking of archives into /tmp rather than the directory that the archive file is in. This is useful if unpacking into the FAT directories fails for some reason (like non-ASCII characters in image filenames). Edit 5: Added popup dictionary. Also switched from using the external unzip and unrar programs to using libzip and libunrar. So, unrar and unzip aren't provided in the zip file anymore. The program starts up and shuts down much faster now since each image is unpacked as needed (rather than all the images at once in the beginning), it takes up much less file space when running, and all images are temporarily unpacked to /tmp so that odd characters in filenames shouldn't be a problem anymore. Edit 6: Added support for BMP and GIF images. Thanks to a lot of testing and excellent suggestions by @dtanis, I've been able to add support for using the stylus to control the program. You can pop up the main menu by tapping, pan the image and change pages by swiping with the stylus, and set the custom zoom by dragging across the part of the image you want to zoom in on. Horizontal panning was disabled in custom zoom mode so that swiping and left/right button pushes could be used to change pages then. This is pretty much everything I wanted to add to the program, so I don't expect many more features to go in after this. Still, suggestions and bug reports are always welcome. (Sorry, original uploads had a bug when decoding some GIFs, so a fixed version has been uploaded) Edit 7: Added a menu item for rotating the screen if the global setting isn't set to automatic (for @fsvum). If it is set to automatic, then the program just behaves as before. So, there is no need to re-download and install if you use automatic orientation all the time. Edit 8: Added support for (single image) TIFF files. Fixed a memory leak while decompressing RAR files. Edit 9: Added menu and configuration options for enabling/disabling the status bar at the bottom of the display (for @vomov). Edit 10: Added icons to the global configuration menu to make the text readable. Also added cartoon panel detection and navigation, so that those without a touchscreen could more easily read cartoons and manga. Edit 11: Fixed handling of RGB data from PNG images when detecting cartoon panels. Edit 12: Fixed rotation menu items, and the saving of state when the program was backgrounded. Also, added the option of automatically enlarging each cartoon panel to fit within the display. Thanks to PascalV for the bug reports and the suggestion. Edit 13: Updated the beginning of this post to better reflect how the program now works (instead of how it worked on the first release). Edit 14: Fixed the broken touch functionality, configuration page, and added zoom by pinching, all for the Touch 622. Thanks to luigibrosse, DmitryZ and seiichiro018 for helping me with that. Changed zooming to try to keep the same point at the center of the image. Edit 15: Added support for zip and rar archives encrypted by a simple password. Added French, Portuguese and German translations (thanks to PascalV and seiichiro018). The step size percentage can now be configured to give 611 users a little more control (thanks to Klapo). The current image can now be saved to a configurable directory via the main menu. Edit 16: Added the ability to automatically start the next archive in the directory, and also to automatically restart archives at the beginning if they were exited on the last page previously. Both features need to be enabled in the configuration page, as they are off by default. @dtanis has also supplied a full Dutch translation, and a partial Japanese translation (to be finished later), and PascalV and seiichiro018 have updated the French, Portuguese and German translations for the new features. Edit 17: The last update had a broken configuration on the Touch. A fixed version was uploaded. The version for the older 3XX devices wasn't changed. Edit 18: Added automatic startup after booting. Improved sorting of filenames in archives. Check magic number of RAR and ZIP files in case they are named incorrectly. Instantly apply Auto Panel Mode to current page, plus show icons in the bottom panel to indicate when the mode is on (as well as when auto resizing of panels is on). Added Brightness/Contrast/Gamma controls. Changed Next/Prev buttons on the Touch to step between panels in that mode, or just step the pages up and down otherwise. Added global configuration item for setting the screen orientation at startup (unless Automatic Orientation is enabled on the device). Added translations from dtanis, PascalV and seiichiro018. Edit 19: Fixed a bug where the app crashed when launched from the Applications tab. Thanks to Dungeone for pointing it out. The source code and binaries are also available at: http://www3.telus.net/rkomar/pbimageviewer/ Last edited by rkomar; 04-19-2013 at 02:12 PM. |
|
|
|
|
|
#2 |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 40
Karma: 27464
Join Date: Oct 2011
Device: PocketBook Pro 912
|
Hello rkomar,
Nice to see that somebody made a conversion of an imagearchive viewer program. I tested it on my PocketBook Pro 903 with FW 2.05 but the application won't start. It just exit. I ran the application from Poterm and it showed the next error: FT_New_Face: cannot open /mnt/ext1/system/bin/unrar Segmentation fault But the unrar (I took the last version you uploaded today) file is there and I can run it under poterm without any problems. Do you have an idea what's going wrong? |
|
|
|
|
Enthusiast
|
|
|
|
#3 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 215
Karma: 3184
Join Date: Feb 2011
Device: PB602, Palm TX
|
Nice one, thank you
.
|
|
|
|
|
|
#4 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,246
Karma: 2818722
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1
|
Quote:
|
|
|
|
|
|
|
#5 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,246
Karma: 2818722
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1
|
Not much interest here, but I'll press on nonetheless. I've just uploaded some new versions that will hopefully fix the problem @dtanis had, as well as a few others.
I've also uploaded the source code for the program and sources for the unrar/unzip programs to my website: http://www3.telus.net/rkomar/pbimageviewer/ |
|
|
|
|
|
#6 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,897
Karma: 1810867
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini
|
well, I've put a link in the sticky thread
![]() It is very useful! |
|
|
|
|
|
#7 |
|
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Dec 2011
Device: Pocketbook IQ
|
I found another alternative for viewing many images files on the pocketbooks. And although the IQ 701 states that it can read jpegs, it doesn't really seem to.
A simple way I found was to convert the many image files into a djvu file. Initially I tried PDF, but PDFs are more resource intensive than djvu files to read, and the IQ 701 was grinding to a halt on big PDFs. I'm sure there are many conversion programs on Windows, but as I use Ubuntu it was a bit harder to find a proper GUI conversion program. But...I did find one... Its called gscan2pdf. http://gscan2pdf.sourceforge.net/ It can convert any type of image file(s) to a PDF, djvu, or other formats. For me, this was the easiest alternative to convert comic book image files to something that the pocketbooks could read effectively. |
|
|
|
|
|
#8 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,246
Karma: 2818722
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1
|
Quote:
The big advantages for me with pbimageviewer are that I don't need to convert at all anymore (except for renaming .zip to .cbz), and the controls for viewing are better. It is easy to tailor the initial page layout, and you have finer control over panning in zoomed in images. I no longer have the problem of seeing half of a panel in one view and the other half in the next view. That's what irritated me the most, and drove me to find something better. Edit: Oh yes, and welcome to MobileRead, mullenkamp. Last edited by rkomar; 12-31-2011 at 02:15 PM. |
|
|
|
|
|
|
#9 |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 40
Karma: 27464
Join Date: Oct 2011
Device: PocketBook Pro 912
|
Hello rkomar,
Tried program yesterday. It works fine now. Thank your very much. Now I can read my comics without converting them. Happy New Year to you. Got one request though. Is it possible to add an new zoom option where you customize the zoom level? Quite some comics have blank margins at both sides, so a 'fit width' makes the image just too small due to those blank margins. If there was an option where you could set a (by entering numbers) custom zoom and which also autom. center the image horizontally (not vertically) after zooming, I could get rid of those margins by zooming up an image a little more than the 'fidth width' value. |
|
|
|
|
|
#10 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,246
Karma: 2818722
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1
|
Quote:
Anyway, it wasn't too hard to implement, so I added it to the program. I've updated the zip files at the top of this thread and at my website with the new binaries and source file.I fooled around with it, and it really only does what you want if every image is the same size. If the images vary, then the results are hit and miss. I think ideally you would want to work out how big the margins are for each image and fit the image without the margins, but that's more work than I want to do at the moment. Some scans are quite dirty and the margins are full of noise, so doing it robustly would take some care. |
|
|
|
|
|
|
#11 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,897
Karma: 1810867
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini
|
rkomar, I've just started really playing around with this, and it is great, again thanks a lot. When running it from the applications menu, the options I had to open the directory were either the root of the SD card, or the directory "Books" on the device: is there any way to change this default (I wanted if possible to go higher up in the directories hierarchy)? I could not see how from the configuration settings.
More generally, I have a question on how to use it for exchanging annotated files. When taking free hand notes, the device records for each page two files, a .png image file of each page, and a corresponding .png.svg file that overlays the hand written notes. I can manually combine each pair of files to obtain a single image file corresponding to each annotated page, the convert it to pdf and combine all pages to obtain an annotated document, but I wonder whether there is a way to use the applications already developed to do this on the device - this is simply to be able to exchange annotated files with co-workers not yet converted to pocketbook ![]() One final question: I ran your pp from the application menu, and |
|
|
|
|
|
#12 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,246
Karma: 2818722
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1
|
Quote:
As far as combining notes into a document, I doubt whether you'll be able to produce a PDF file from the notes on the device without a lot of work. I'm not sure how you do it now, but I imagine it involves some program that won't build and run on the PocketBook devices. However, since the notes are stored using HTML, maybe it wouldn't be that hard to produce an EPUB file from them. That can be done using a script that would be similar to the edit-epub.app. Would your colleagues be able to use an EPUB file? |
|
|
|
|
|
|
#13 | ||
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,897
Karma: 1810867
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini
|
Quote:
Quote:
Anyhow, your software is really nice! |
||
|
|
|
|
|
#14 |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 40
Karma: 27464
Join Date: Oct 2011
Device: PocketBook Pro 912
|
Thank rkomar for implementing that feature. It works great for me. I found a tiny bug, but I think the problem lies in the firmware. When the zoom keyboard is opened and you use the direction keys (not the stylus) to move to the keyboard to select a certain button, the cursor disappears but no button is selected. You need to press the left direction key several times to gain access to the keyboard. After that it works normally.
|
|
|
|
|
|
#15 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,246
Karma: 2818722
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1
|
@paola:
It looks like the directory structure has changed then in recent firmware versions, because when I open "Book" in my selector, it takes me to the "/mnt/ext1/" directory (I'm still using 2.0.4). I don't have either of the "Books" or "screens" directories. Oh well. There is a long shot of producing PDF files on a device, but it would mean porting NetPBM and libtiff programs. If you can convert the images to TIFF format, then you can combine them into a single multi-page TIFF file using tiffcp, and then convert that to a PDF file using tiff2pdf. I suspect building those for the PocketBook devices wouldn't be hard. However, I don't know how to combine the PNG and SVG files into a single TIFF image (maybe using pngtopam, svgtopam, and then pamcomp to overlay them). With my non-touchscreen device and older firmware, I can't reproduce such notes myself to play around with. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Best tablet for .cbr and .cbz | astrangerhere | Android Devices | 5 | 09-20-2011 05:17 PM |
| RAR archives added as CBR format | hrrgll | Library Management | 1 | 08-21-2011 11:39 AM |
| another image, cbr and cbz viewer | Max | iRex | 62 | 06-10-2010 01:57 PM |
| cbr and cbz convertor | asdx | Astak EZReader | 4 | 02-05-2010 02:37 AM |
| My homebrew imanga (image, cbz, cbr viewer)! | ericshliao | iRex | 14 | 08-18-2009 11:50 PM |