Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 09-29-2008, 12:36 AM   #106
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by =X= View Post
@ashkulz Here is a link This file is 17MB because it is already and image.

Also this effect is not tied to a specific PDF, it is observed on any given PDF,
=X=
OK, don't mind me butting in ( it IS my thread ), but I've made a simple change to PDFRead's use of the MinFilter to acheive better results on that .pdf file provided, IMHO.

The MinFilter can use a 3x3 matrix (default=3) or 5x5 matrix when doing its magic. I changed the dilation module's return value in process.py to:
Code:
  return image.filter(ImageFilter.MinFilter(5))
That now results in thicker text prior to the resize which uses the Lanczos filter. However, on low-res .pdf it causes the text to blur too much. In that case, raise the initial 300 DPI to 400 or 500; 600 was very slow, but may be better?

Could you test to see which resulting .lrf (first 5 pages only) looks better on the hardware reader? (Sorry for the stretch of short pages, I still have to fix that one!!!) What about the comparison with PDFLRF now?

p.s. I provide the modified PDFRead bin files which should be placed in the bin directory and overwrite the existing files. Just take a backup first though should you wish to restore those original files.
Attached Thumbnails
Click image for larger version

Name:	pdfread-bierig-1-5.png
Views:	215
Size:	30.9 KB
ID:	16637  
Attached Files
File Type: lrf bierig-MinFilter-3.lrf (200.7 KB, 208 views)
File Type: lrf bierig-MinFilter-5-300.lrf (194.9 KB, 202 views)
File Type: lrf bierig-MinFilter-5-400.lrf (203.0 KB, 205 views)
File Type: lrf bierig-MinFilter-5-500.lrf (199.8 KB, 203 views)
File Type: lrf bierig-MinFilter-5-600.lrf (208.0 KB, 214 views)
File Type: lrf bierig-MinFilter-3-landscape.lrf (342.7 KB, 197 views)
File Type: zip pdfread-MinFilter5-mod-bin.zip (2.25 MB, 195 views)

Last edited by nrapallo; 09-29-2008 at 09:42 AM. Reason: added image showing settings used to create .lrf
nrapallo is offline   Reply With Quote
Old 09-29-2008, 09:45 AM   #107
=X=
Wizard
=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.
 
=X='s Avatar
 
Posts: 3,672
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
Quote:
Originally Posted by nrapallo View Post
OK, don't mind me butting in ( it IS my thread ),
Well considering it was a productive meddling you're excused

Okay I've taken a look at the files, here's the good, the bad.

There is a definite improvement on these files over what 1.8 produces today. They show up much clearer on the reader. There where two files that looked better than the rest. On was the first file minifilter-3 and the other was minifilter-5-400


What I see in PDFReader is a truncation of fonts on the top or bottom part. The best example is on Pg 6 of the landscape. However this occurs through out the text.
Some of the pixels on the font are getting erased, by dropping the dilation you overcome this but it bleeds over. I think if you stretch the page out the bleeding will be reduced

PDFLRF still looks better but again it is maximizing the screen by croping off the white spaces. I do notice PDFLRF does bleed seen mostly with the "a" font. I suspect if you dilate with a value of 300 and stretch the screen you should get similar results to that of PDFLRF.

=X=

Last edited by =X=; 09-29-2008 at 09:45 AM. Reason: fixed typo
=X= is offline   Reply With Quote
Old 09-29-2008, 11:22 AM   #108
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by =X= View Post
Well considering it was a productive meddling you're excused

Okay I've taken a look at the files, here's the good, the bad.

There is a definite improvement on these files over what 1.8 produces today. They show up much clearer on the reader. There where two files that looked better than the rest. On was the first file minifilter-3 and the other was minifilter-5-400
Is it Coke or Pepsi? Years ago, this was the norm for commercials by Pepsi where the "public" was asked which one was better (without seeing the brand). On the Pepsi commercials, all chose "Pepsi"!

Ok back to reality, the MinFilter-3 is the original PDFRead executable with the default MinFilter(3) with only 8 colors. The MinFilter-5-400 is the MinFilter using the 5x5 matrix and 400 DPI. Here you get a higher resolution with thicker text before the resize op kicks in.

Quote:
What I see in PDFReader is a truncation of fonts on the top or bottom part. The best example is on Pg 6 of the landscape. However this occurs through out the text.
Some of the pixels on the font are getting erased, by dropping the dilation you overcome this but it bleeds over. I think if you stretch the page out the bleeding will be reduced
That's just the anti-aliasing done in 8 colors; try using 4 colors or 2 colors! The edges are smoothed between the black text and white background and anytime the transition is more white/gray you get that "loss" effect.

Quote:
PDFLRF still looks better but again it is maximizing the screen by croping off the white spaces. I do notice PDFLRF does bleed seen mostly with the "a" font. I suspect if you dilate with a value of 300 and stretch the screen you should get similar results to that of PDFLRF.

=X=
The pylrf library used by PDFRead handles all this for the program, so that stretching adds further to the distortion of the text and more lost pixels. Now to figure out a way to counter-act it...

p.s. However, PDFRead does produce a page which is cropped to remove the margin, so maybe the pylrf library is adding that white margin? Have you seen the .png pages that PDFRead produces? If not, use that 'debug' feature explained in post #1 above (last entry under [2008-03-12] 1.8 (by AK and NR)).

Last edited by nrapallo; 09-29-2008 at 11:41 AM. Reason: typos
nrapallo is offline   Reply With Quote
Old 09-29-2008, 02:15 PM   #109
ashkulz
Addict
ashkulz will become famous soon enoughashkulz will become famous soon enoughashkulz will become famous soon enoughashkulz will become famous soon enoughashkulz will become famous soon enoughashkulz will become famous soon enoughashkulz will become famous soon enough
 
ashkulz's Avatar
 
Posts: 350
Karma: 705
Join Date: Dec 2006
Location: Mumbai, India
Device: Kindle 1/REB 1200
Looks like the Sony software has issues with VirtualBox, so I'll have to download and install VMWare
ashkulz is offline   Reply With Quote
Old 09-29-2008, 02:16 PM   #110
=X=
Wizard
=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.
 
=X='s Avatar
 
Posts: 3,672
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
Quote:
Originally Posted by nrapallo View Post
Is it Coke or Pepsi?
Okay that is what I get for trying to talk intelligently beofre my


Quote:
Originally Posted by nrapallo View Post
The pylrf library used by PDFRead handles all this for the program, so that stretching adds further to the distortion of the text and more lost pixels. Now to figure out a way to counter-act it...

p.s. However, PDFRead does produce a page which is cropped to remove the margin, so maybe the pylrf library is adding that white margin?<snip...>
I think your on to something. The PNG images produce from PDFRead do look much better than the final LRF file.

I've attached an LRF created by Calibe/BookCreator (I simply slapped the images in a word document then stretched them out.

The result was pretty decent.

=X=
Attached Files
File Type: lrf PDFREADER_v1.lrf (330.6 KB, 219 views)
=X= is offline   Reply With Quote
Old 09-29-2008, 02:52 PM   #111
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by =X= View Post
Okay that is what I get for trying to talk intelligently beofre my
Sorry, I couldn't resist!

But, I do I appreciate the amount of effort your have expended here with this issue.

Quote:
I think your on to something. The PNG images produce from PDFRead do look much better than the final LRF file.

I've attached an LRF created by Calibe/BookCreator (I simply slapped the images in a word document then stretched them out.

The result was pretty decent.

=X=
I had previously looked at Kovid's modified pylrf modules, but couldn't figure out what to change to 'mimic' his lrf generation. Python coding is NOT my forte, so I just tried superficial changes and they all failed. Oh well, I do know someone who knows python very well...

I liked page 1 of your latest .lrf posting (viewed with the software reader). Page 4 was nice too but appeared a bit too squished and lost some definition. The last page was a write-off. Which one did I favour. Was it Coke?

Last edited by nrapallo; 09-29-2008 at 02:54 PM.
nrapallo is offline   Reply With Quote
Old 09-29-2008, 03:38 PM   #112
=X=
Wizard
=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.
 
=X='s Avatar
 
Posts: 3,672
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
Quote:
Originally Posted by nrapallo View Post
Was it Coke?
Nope it was Pepsi

=X=
=X= is offline   Reply With Quote
Old 09-29-2008, 03:44 PM   #113
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by =X= View Post
Nope it was Pepsi

=X=
Pepsi (MinFilter-5-400)?
nrapallo is offline   Reply With Quote
Old 09-29-2008, 04:08 PM   #114
=X=
Wizard
=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.
 
=X='s Avatar
 
Posts: 3,672
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
Quote:
Originally Posted by nrapallo View Post
Pepsi (MinFilter-5-400)?
PDFRead Dilation 300 DPI (All the images where produced from PDFRead)
=X= is offline   Reply With Quote
Old 09-29-2008, 04:40 PM   #115
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by =X= View Post
PDFRead Dilation 300 DPI (All the images where produced from PDFRead)
From the modified PDFRead bin (for that MinFilter-5 recent change); all at 300 DPI right?

What would 400/500 DPI look like then.
nrapallo is offline   Reply With Quote
Old 09-29-2008, 05:55 PM   #116
=X=
Wizard
=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.
 
=X='s Avatar
 
Posts: 3,672
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
Option e) "None of the above"

It's an unmodified PDFRead v1.82. I did change the settings from my very first post, as I've been learning how to use PDFRead

Settings;
DPI: 400
color: 4
Crop %: 5
Edge Level: 6
H/W: 754/584
The rest of the settings are default

Now I'm tempted to see how good the modified PDFRead looks.
=X=
=X= is offline   Reply With Quote
Old 09-29-2008, 06:44 PM   #117
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by =X= View Post
Option e) "None of the above"

It's an unmodified PDFRead v1.82. I did change the settings from my very first post, as I've been learning how to use PDFRead

Settings;
DPI: 400
color: 4
Crop %: 5
Edge Level: 6
H/W: 754/584
The rest of the settings are default
The Edge level is quite high. 5 is better or try checking the no edge enhance box at the box of the GUI. BTW, the default prs505-p profile uses 753/583 as it's H/W.

Quote:
Now I'm tempted to see how good the modified PDFRead looks.
=X=
I hope you are pleasantly surprised when you do. Quick, buy some PDFRead stock, now.....
nrapallo is offline   Reply With Quote
Old 10-01-2008, 01:44 PM   #118
=X=
Wizard
=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.
 
=X='s Avatar
 
Posts: 3,672
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
So yesterday I tried this method to make PDF readable under the SONY. The process is found under Poor boys way of editing PDF.... Anyhow with SONY's firmware release for the PRS-505 this solution is very nice. The advantage is that it keeps the PDF as text and not into an image.

Essentially this tool does two things, remove the margin and change the fonts. I found removing the margin the only thing necessary, but changing the font also helped . I guess the reason I'm posting here is to wonder how hard it would be to include this as an additional SOLUTION for PDF?

=X=

Last edited by =X=; 10-01-2008 at 01:46 PM. Reason: Grammer fix
=X= is offline   Reply With Quote
Old 10-01-2008, 02:03 PM   #119
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by =X= View Post
...an additional SOLUTION for PDF?

=X=
Other possible solutions as posted by caritas (uses Sony PRS505) include:They all have stengths and weaknesses, but since PDFRead is an image based solution right now, I would think the one in bold, above, would be the BEST solution overall!
nrapallo is offline   Reply With Quote
Old 10-01-2008, 03:31 PM   #120
=X=
Wizard
=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.
 
=X='s Avatar
 
Posts: 3,672
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
Well yes they are all good. (The middle solution is modifying the font on the PDF before it is converted to an image hm...)

The problem with image based solutions is that they loose font crispness as so do the images in the PDF. This is do to all the image manipulation done get the image viewable on the target device. Also the final eBook is HUGE compared to the original. A typical 500KB PDF will be close to 10MB.

Now only modifying the margin and Font will preserve the images and font quality in addition to keeping the final eBook size very small

Anyhow just food for thought

=X=
=X= is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help using PDFRead daithi81 Workshop 8 10-16-2009 09:33 AM
Need help with PDFRead pfisterfarm PDF 8 03-23-2009 09:19 AM
pdfread cybook x3oo Cybook 2 03-09-2009 11:49 AM
PDFRead 1.7 released ashkulz PDF 87 03-12-2008 10:29 AM
PDFRead v5 available on Sourceforge Alexander Turcic PDF 3 04-08-2007 06:31 AM


All times are GMT -4. The time now is 08:11 PM.


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