Quote:
Originally Posted by alex_d
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.
|
Well, I've done conversions using both pngnq and pnmquant and I've found that the pngnq conversions look best on the desktop. All the other devices I have access to either support monochrome (so it doesn't matter) or at least 16 colors (where there the palette difference would be small). Also, most of the PDFs I tested were mostly text where there aren't too many colors involved -- results may be different if images are involved. If you (or someone else) can verify that there is significant degradation then I'll implement pnmquant side by side with pngnq and use pnmquant for the reader profiles.
Quote:
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.
|
Thanks! I still have plans to improve PDFRead backend, I will prefer to leave the frontend to kovidgoyal

Some things I am planning to add:
- the 1/3 mode requested by gdxf
- 1/4 mode, similiar to what you have in RasterFarian
- color support throughout (only useful for the 1200 atm)
- "reflow" mode
The "reflow" mode is where I am going to put in the most effort. That will take the dilated image at 300dpi, use page segmentation techniques for figuring out the individual lines and words (taking inspiration from OCR) and then cutting/pasting image segments so that the aspect ratio of the image is changed, while keeping the same text. This is important as sometimes even when using landscape mode the text is too small because of the page size and/or the aspect ratio. This will effectively reflow documents having mainly text content. I'll be using the ideas/code I've already implemented for aggressive cropping and taking it quite a bit further