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

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex

Notices

Reply
 
Thread Tools Search this Thread
Old 12-20-2006, 07:59 AM   #1
Kirys
Zealot
Kirys has learned how to buy an e-book online
 
Posts: 122
Karma: 86
Join Date: Dec 2006
Location: Italy
Device: Boox M90
Smile Comics to PDF

I've found a nice java library for making pdf (called itext), and i was trying to make a small software for create iliad optimized pdfs from comics scans.
I still not have an ILIAD (i don't know know yet when i'll buy it :P) but i was courious to try the pdf generated with this lib on an iliad.
Is someone iterested it making some experiments?
any suggestion for the ideal image size for the iliad?

Cya

[edit]
Now there is only one pdf generated following most of the suggestions of scotty
Attached Files
File Type: pdf TestFile4.pdf (902.6 KB, 333 views)

Last edited by Kirys; 12-21-2006 at 06:58 AM. Reason: I've attached a second pdf generated after some bugs fixes
Kirys is offline   Reply With Quote
Old 12-20-2006, 11:47 AM   #2
raevyn1
Connoisseur
raevyn1 doesn't litterraevyn1 doesn't litter
 
Posts: 56
Karma: 148
Join Date: Jul 2006
Device: iLiad, Sony Reader, Treo 755p, Palm T|X
Your test pdf looks good, Kirys. The comics scale fairly well. Sorry no pix, but I'm currently at work. Tell us some more about iText. Is it easy to use and customize?
raevyn1 is offline   Reply With Quote
Old 12-20-2006, 11:58 AM   #3
jęd
Evangelist
jęd has a complete set of Star Wars action figures.jęd has a complete set of Star Wars action figures.jęd has a complete set of Star Wars action figures.
 
Posts: 458
Karma: 293
Join Date: May 2006
Quote:
Originally Posted by Kirys
I've attacched a sample pdf i've generated using this lib!
Thats cool... One question... What did the original look like...? Ie, how much alteration did you have to do...?
jęd is offline   Reply With Quote
Old 12-20-2006, 12:26 PM   #4
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
Here's a screen shot.
Attached Thumbnails
Click image for larger version

Name:	comic.png
Views:	355
Size:	442.7 KB
ID:	2486  
scotty1024 is offline   Reply With Quote
Old 12-20-2006, 12:37 PM   #5
Kirys
Zealot
Kirys has learned how to buy an e-book online
 
Posts: 122
Karma: 86
Join Date: Dec 2006
Location: Italy
Device: Boox M90
Cool

Quote:
Originally Posted by raevyn1
Your test pdf looks good, Kirys. The comics scale fairly well. Sorry no pix, but I'm currently at work. Tell us some more about iText. Is it easy to use and customize?
http://www.lowagie.com/iText/

Actually I am just aiming at the jpg to pdf application so I don't know all features of the lib yet, till now seems not difficult to use (if you develop in java you should have no problem at all), and powerfull enought for creating also really complex pdfs (is seems also to have some kind of html parser builtin).
I hope to post (if i'm allowed) a first version fo the app soon, but is not yet safe to use yet :P

Quote:
Originally Posted by jęd
Thats cool... One question... What did the original look like...? Ie, how much alteration did you have to do...?
Atually The lib don't alter the jpegs itself i made the code (using standard java libs) that scales down the jpegs and set them as grayscale (the version i used for that pdf was bugged and generate a wrong aspect ratio btw), so from that point of view that is fully customizable .
I've attacched a couple of the source jpeg to let you evaluate the difference.

Quote:
Originally Posted by scotty1024
Here's a screen shot.
seems good
Cya
Attached Thumbnails
Click image for larger version

Name:	ultimate#2p06.jpg
Views:	232
Size:	167.1 KB
ID:	2484   Click image for larger version

Name:	The Dark Knight Strikes Again 2 pg02.jpg
Views:	384
Size:	467.8 KB
ID:	2485  
Kirys is offline   Reply With Quote
Old 12-20-2006, 03:30 PM   #6
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
OK, I dug into your actual PDF file and your image scaling is not correct.

Your image is scaled to 1250x1024 and the JPEG for page 2 is 264156 bytes long.

The PDF library is rendering the media box to 14.2" by 17.4" to hold the large image and the iLiad is thus scaling it to make it fit on the screen. You'd do much better to scale the image to a maximum height of 935 using Java's 2D as it has a much better scaling algorithm than the iLiad has at present.

I would also suggest having Java reduce the gray color space to match the iLiad's as well since again Java's 2D package has a better method available.

The iLiad grey values are: 0xf0, 0xe0, 0xd0, 0xc0, 0xb0, 0xa0, 0x90, 0x80, 0x70, 0x60, 0x50, 0x40, 0x30, 0x20, 0x10, 0x00. Future versions of the iLiad (or current users of my enhanced ipdf) treat 0xff the same as 0xf0.

I recommend a media box of 425 by 351.

Based on the large size of the DCTStream I suspect you didn't actually convert the image to a gray scale bitmap in Java 2D, just reduced the colors to gray and left it in a RGB Bitmap. If you convert the image to a gray scale bitmap and feed it to the JPEG encoder you will produce a grey scale JPEG which is considerably smaller than a RGB JPEG as it doesn't need to compress the color space, just crunch down the luminous data.

This will not only reduce the size of the resulting PDF document but in a soon-to-be-released version of Poppler it will result in a considerable savings in decoding time on the iLiad as well.

I personally recommend using http://www.pdfbox.org and I've posted various tools w/Java source here (despite libelous statements about my source code sharing habits made by another member here) that use that library so you can find examples of using it to create iLiad friendly PDF's.
scotty1024 is offline   Reply With Quote
Old 12-20-2006, 04:00 PM   #7
Kirys
Zealot
Kirys has learned how to buy an e-book online
 
Posts: 122
Karma: 86
Join Date: Dec 2006
Location: Italy
Device: Boox M90
Cool

Quote:
Originally Posted by scotty1024
OK, I dug into your actual PDF file and your image scaling is not correct.[..]You'd do much better to scale the image to a maximum height of 935 using Java's 2D as it has a much better scaling algorithm than the iLiad has at present.
so the actual available height is 935, and is the width is the full 768?
I've chosed to have the landscape mode as target, cause I don't have yet any idea of how much is readable a comic into standard mode

Quote:
Originally Posted by scotty1024
The iLiad grey values are: [..]I recommend a media box of 425 by 351.
Those are really valuable info, that should be into the FAQ

Quote:
Originally Posted by scotty1024
Based on the large size of the DCTStream I suspect you didn't actually convert the image to a gray scale bitmap in Java 2D, just reduced the colors to gray and left it in a RGB Bitmap. If you convert the image to a gray scale bitmap and feed it to the JPEG encoder you will produce a grey scale JPEG which is considerably smaller than a RGB JPEG as it doesn't need to compress the color space, just crunch down the luminous data.
this is something that is making me crazy...
this is the first time i'm doing "image manipulation" in java, but following the docs creating the image this way
image = new BufferedImage(width,height,BufferedImage.TYPE_BYTE _GRAY);
should allow the jpeg encoder to generate the grayscale jpeg, but actually it doesn't...

Quote:
Originally Posted by scotty1024
I personally recommend using http://www.pdfbox.org and I've posted various tools w/Java source here (despite libelous statements about my source code sharing habits made by another member here) that use that library so you can find examples of using it to create iLiad friendly PDF's.
I'll take a look
Thank you for your help

Cya
Kirys is offline   Reply With Quote
Old 12-20-2006, 04:31 PM   #8
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
Which Java version are you running? JDK 1.5.0_10, 1.6.0???
scotty1024 is offline   Reply With Quote
Old 12-20-2006, 04:38 PM   #9
Kirys
Zealot
Kirys has learned how to buy an e-book online
 
Posts: 122
Karma: 86
Join Date: Dec 2006
Location: Italy
Device: Boox M90
Cool

actually 1.4.2 (under kubuntu linux)
It is the only package available under adept.
Kirys is offline   Reply With Quote
Old 12-20-2006, 04:46 PM   #10
Kirys
Zealot
Kirys has learned how to buy an e-book online
 
Posts: 122
Karma: 86
Join Date: Dec 2006
Location: Italy
Device: Boox M90
actually it seems that the jpeg generated is correctly a grayscale jpeg (at least gimp says so)
So maybe is the pdf lib that does something wrong...
Attached Thumbnails
Click image for larger version

Name:	test2.jpg
Views:	265
Size:	205.7 KB
ID:	2488  
Kirys is offline   Reply With Quote
Old 12-20-2006, 05:17 PM   #11
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
Java 2D is much better in 1.5 and much better again in 1.6...

I believe you can get a universal linux java from http://www.javasoft.com that will get you to 1.6.
scotty1024 is offline   Reply With Quote
Old 12-21-2006, 03:30 AM   #12
Kirys
Zealot
Kirys has learned how to buy an e-book online
 
Posts: 122
Karma: 86
Join Date: Dec 2006
Location: Italy
Device: Boox M90
yes I know but most linux users have 1.4.2, I want to stay compatible (1.5 is also much faster than 1.4)
Now first I want to make a decent version of the converter with 1.4, then I need to buy my iliad, and maybe by then the linux comunity will start using 1.5 or 1.6 :P
Kirys is offline   Reply With Quote
Old 12-21-2006, 04:58 AM   #13
jęd
Evangelist
jęd has a complete set of Star Wars action figures.jęd has a complete set of Star Wars action figures.jęd has a complete set of Star Wars action figures.
 
Posts: 458
Karma: 293
Join Date: May 2006
Quote:
Originally Posted by Kirys
yes I know but most linux users have 1.4.2, I want to stay compatible (1.5 is also much faster than 1.4)
Now first I want to make a decent version of the converter with 1.4, then I need to buy my iliad, and maybe by then the linux comunity will start using 1.5 or 1.6 :P
Well... Since 1.5 is only a download away you may as well go with it... It has some nice features that make life *much* easier... And its not like you can't have multiple JREs co-existing...

I'm sure someone who's using Linux and an Iliad is adept enough to install it...
jęd is offline   Reply With Quote
Old 12-21-2006, 06:09 AM   #14
Kirys
Zealot
Kirys has learned how to buy an e-book online
 
Posts: 122
Karma: 86
Join Date: Dec 2006
Location: Italy
Device: Boox M90
Smile

I do plan making also other softwares that are not only for iliad users
I love JAVA , but actually under linux manually install j2re and jdk and making them works into the dev enviroment is a real pain, i prefer developing to configuring .
Maybe next time i'll be into the right mood (but all this is off topic )

coming back to in topic mode
Could someone post some iliad shot with different pages of the second pdf i've posted?
Kirys is offline   Reply With Quote
Old 12-22-2006, 06:06 AM   #15
Kirys
Zealot
Kirys has learned how to buy an e-book online
 
Posts: 122
Karma: 86
Join Date: Dec 2006
Location: Italy
Device: Boox M90
I have somekind of a working preview version of the software, can I post it somewhere?
Kirys 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
PRS-500 Manga2Ebook, initial release. Convert your manga/comics-archive to PDF (.net2.0) athlonkmf Sony Reader Dev Corner 48 02-22-2011 09:44 AM
Converting Kindle comics in mobi to epub or pdf Sunita Calibre 3 05-16-2010 06:46 PM
PDF, HTML, Comics Operator23 Which one should I buy? 9 12-30-2008 03:22 AM
PDFresize - any good for PDF comics? GavinK151 Bookeen 6 03-29-2008 09:19 AM
Convert multiple images(comics) to PDF - MAC stustaff Sony Reader 2 11-28-2007 10:31 AM


All times are GMT -4. The time now is 04:41 AM.


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