04-30-2007, 06:53 PM | #46 | |
Enthusiast
Posts: 48
Karma: 27
Join Date: Oct 2006
Device: Sony Reader PRS-500
|
Quote:
|
|
05-01-2007, 10:54 AM | #47 | |
Addict
Posts: 350
Karma: 705
Join Date: Dec 2006
Location: Mumbai, India
Device: Kindle 1/REB 1200
|
Quote:
|
|
Advert | |
|
05-01-2007, 05:18 PM | #48 | |
Enthusiast
Posts: 48
Karma: 27
Join Date: Oct 2006
Device: Sony Reader PRS-500
|
Quote:
|
|
05-04-2007, 05:26 AM | #49 |
Addict
Posts: 303
Karma: 187
Join Date: Dec 2006
Device: Sony Reader
|
ashuklz, the samples page for pngnq shows amazing rgb->256 quantizations. However, I think its magic is about finding the right palette and it doesn't let you specify your own. If so, then it's the wrong tool for the job because its optimized palette would degrade quality because the reader cannot display it. The only tool i've found so far that does color reduction properly is pnmquant.
Anyway. It looks like you are creating an extremely powerful backend and pdfread may soon obviate rasterfarian. Before that happens, though, you need to add a few more screens to your windows gui. One screen has to let you set up how the page looks. This means rotation, splitting, etc. Optionally in addition, you should have a page that shows an in-window preview (which is important with all your options for autocropping, etc.) Another page, in the beginning, should let you collect multiple source (e.g. multiple images or chapters from a book). Also, some form of GUI batching is also needed (maybe it can go on that first page). What i did in rasterfarian was to use the filesystem to effect semaphores. Very dirty, but better than nothing. I don't know too much about the limitations of the way you do your gui, but at least some things should be implemented. But anyway, now that we have a good backend I really hope someone who knows C# or something can step up and make an excellent front end too. It upsets me how few people know of these rasterization tools (eg on sites that talk about the reader or in reviews). That means something very big is still missing. |
05-04-2007, 10:45 AM | #50 |
creator of calibre
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I am working on a GUI right now. Just have to make my current GUI multi-threaded.
|
Advert | |
|
05-04-2007, 12:26 PM | #51 | |
Addict
Posts: 350
Karma: 705
Join Date: Dec 2006
Location: Mumbai, India
Device: Kindle 1/REB 1200
|
Quote:
BTW, I think the implementation of the Device class for REB1100 should be done in a day or two, so you'll also have to refactor the GUI to take that into account too... |
|
05-04-2007, 12:46 PM | #52 | ||
Addict
Posts: 350
Karma: 705
Join Date: Dec 2006
Location: Mumbai, India
Device: Kindle 1/REB 1200
|
Quote:
Quote:
|
||
05-04-2007, 03:13 PM | #53 | |
Enthusiast
Posts: 48
Karma: 27
Join Date: Oct 2006
Device: Sony Reader PRS-500
|
Quote:
|
|
05-04-2007, 09:12 PM | #54 |
Addict
Posts: 303
Karma: 187
Join Date: Dec 2006
Device: Sony Reader
|
ashkulz, that page reflowing sounds pretty cool. will it only take out big spaces, or could you do something subtle like decrease line spacing? Actually, for that, you'd probably be better off trying something drastic like modifying the pdf itself. (It's nearly impossible to increase boldness that way... believe me, I've tried... but font kerning should be easier.)
Another thing you should put in the backend is the ability to render any subsection of a page. JAP used this feature as the basis of the tool, and for a suitably powerful gui it would allow the greatest flexibility. My next project I think will be to start writing a new gui for the Sony Reader. (The knowledge for doing this is a bit scattered right now, but I've talked with some people who collectively seem to have all the pieces.) At first i'll focus on the core rendering to speed up page-turns (very important for nonfiction/textbooks that I read) and improve quality. I'll do this by implementing page caching and change the the refresh policy in a way that lowers battery life (i.e. no more black-white flashing but rather multiple refreshes). Cold page turns should go from the 2s they are now (for rastered .lrf) to 0.25s or less. Also I'll implement page-number entry and folder-based navigation (and maybe panning, zooming, and even searching... although searching won't be straightforward seeing as I'll still be using an image-based book format). I know none of the above things are an issue for you, ashkulz, with your fancy 1100, but hopefully it'll be the start of a good project. I've also given some thought to a better font-enhancement algorithm vs edge enhancement that would essentially do autohinting on bitmaps. I'll try experimenting a bit with that (but I have a feeling it'll be incredibly processor-intensive). |
05-04-2007, 09:51 PM | #55 |
Addict
Posts: 303
Karma: 187
Join Date: Dec 2006
Device: Sony Reader
|
P.S. For 16-color devices, the dithering won't make a big difference. For the 4-color sony, it does. White backgrounds get a light gray snow and black text gets a dark gray one. The end result is decreased contrast on a device which has poor contrast to begin with. I made a mistake, however. The right tool is NOT pnmquant (which does the whole find-the-best-palette bs). Rather, it is pnmremap which lets you specify a custom palette. The command line for it is 'pnmremap mapfile=palette.pnm -floyd' where palette.pnm is a file that contains:
Code:
P2 4 1 255 0 85 170 255 Code:
P2 16 1 255 0 17 34 41 68 85 102 119 136 153 170 187 194 211 238 255 Last edited by alex_d; 05-04-2007 at 09:56 PM. |
05-05-2007, 12:47 AM | #56 | |
creator of calibre
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
That's great I'm going to refactor the GUI anyway to support multithreaded device operations as I dont like having the GUI freeze while transferring stuff to the device. There may be a couple of small additions to the device interface to support multithreading...nothing that would require any major rewrites though. |
|
05-05-2007, 05:19 AM | #57 | ||||
Addict
Posts: 350
Karma: 705
Join Date: Dec 2006
Location: Mumbai, India
Device: Kindle 1/REB 1200
|
Quote:
What I want to do with reflow is to break up indiviudal lines, and move part of the words to the next line (and so on for the rest of the lines). Something like what happens when you reduce the browser window size, the text automatically reflows. I've got a very simplistic algorithm in mind, but I'll document it after I've actually tested it out Quote:
Quote:
Quote:
|
||||
05-05-2007, 05:38 AM | #58 | ||
Addict
Posts: 350
Karma: 705
Join Date: Dec 2006
Location: Mumbai, India
Device: Kindle 1/REB 1200
|
Quote:
Quote:
I also do dilation and resizing differently from RasterFarian. I render the PDF/DJVU at the dilation DPI, without specifying a page size. So Ghostscript or DJVU automatically create a image with size appropriate for that resolution. I don't know what the size is up front at all, and in fact it varies from book to book. I perform cropping/dilation at that DPI, and then depending on the mode I resize it down and split it up if necessary while maintaining the aspect ratio. This ensures that whatever may be the input page size it really doesn't matter to PDFRead -- what matters is the DPI, aspect ratio of cropped content and the mode. BTW, I've already implemented everything except the "reflow" mode in SVN. I hope to have at least a rudimentary implementation done by tomorrow (I'll optimize for speed later). |
||
05-05-2007, 05:53 AM | #59 | |
Addict
Posts: 350
Karma: 705
Join Date: Dec 2006
Location: Mumbai, India
Device: Kindle 1/REB 1200
|
Quote:
|
|
05-05-2007, 09:38 AM | #60 |
creator of calibre
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The callback way is how its done now. When I said the GUI freezes, I meant only that you cant perform other tasks while waiting for bulk writes to finish.
The reason I'm switching to threads is that I will want to make a bunch of processes multithreaded...converting from TXT,HTML,PDF->LRF as well as actually copying files to the device. In the future there will probably be more functionality as well. Making it multi-threaded will make implementing a queueing system easy. Besides I don't have much experience with multi-threaded programming and I'm looking at this as a good way to learn ;-) |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PDFRead 1.8.2 released! | nrapallo | Workshop | 372 | 12-29-2011 11:26 AM |
Need help using PDFRead | daithi81 | Workshop | 8 | 10-16-2009 09:33 AM |
Hacks Kindle 2 and PDFRead 1.8 | daffy4u | Amazon Kindle | 38 | 05-06-2009 09:38 AM |
Need help with PDFRead | pfisterfarm | 8 | 03-23-2009 09:19 AM | |
PDFRead v5 available on Sourceforge | Alexander Turcic | 3 | 04-08-2007 06:31 AM |