05-26-2007, 03:10 PM | #1 |
Addict
Posts: 205
Karma: 317
Join Date: Oct 2006
Location: England
Device: Sony PRS-505, iPad, Kindle 3
|
comiclrf - Comic Book (CBZ,CBR) to LRF converter
UPDATE ComicLRF has now been added to kovidgoyal's Calibre. It uses Calibre's GUI as well as a command line utility (comic2lrf). I'll keep this here for now until the code has matured in Calibre.
Command line program to convert Comic Books (CBZ & CBR format) into an LRF file you can load onto the Sony Reader. See Wikipedia This program extracts and converts the images using ImageMagick into a format suitable for the Reader. The images are resized to match the Reader screen size, white spaces around the edges of the images are cropped and the images are converted to 64 "color" greyscale to look their best on the Reader's grey screen whilst reducing the file size. The images are also sharpened slightly to improve legibility of text. Install Install instructions are in the README.txt in the download files. How to use Once installed open a command/terminal window in the directory with your Comics, then simply pass it the path of the CBZ/CBR file, e.g. comiclrf "Simpsons 01.cbz" (You can pass multiple files to it and use wildcards) Where to get it Download Windows version comiclrf-WINDOWS.zip Download Mac OS X version comiclrf-OSX.tar.gz (it appears to require Leopard) Download Linux version comiclrf-LINUX.tar.gz Some samples; first one fills screen, second preserves aspect ratio Last edited by FangornUK; 08-15-2008 at 09:10 AM. |
05-26-2007, 03:16 PM | #2 |
creator of calibre
Posts: 44,546
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Why don't you make this cross platform by using libprs500 as the backend?
|
Advert | |
|
05-26-2007, 03:31 PM | #4 |
Addict
Posts: 205
Karma: 317
Join Date: Oct 2006
Location: England
Device: Sony PRS-505, iPad, Kindle 3
|
kovidgoyal, I probably will in future, for now I just used LRS2LRF as it just worked. I haven't figured out how to use libprs500 to compile pure LRS files yet. I've only spent a few hours on this so far.
|
05-26-2007, 03:44 PM | #5 |
creator of calibre
Posts: 44,546
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can't use libprs500 to compile LRS files. You can use it to generate the LRF/LRS directly, but you'd have to interface with python code for that.
|
Advert | |
|
05-29-2007, 08:05 AM | #6 |
Addict
Posts: 205
Karma: 317
Join Date: Oct 2006
Location: England
Device: Sony PRS-505, iPad, Kindle 3
|
Updates: Added CBR support. Added Aspect Ratio preserve option. Added user Title and Author options. Added Normalise image option
|
05-29-2007, 12:51 PM | #7 |
Addict
Posts: 205
Karma: 317
Join Date: Oct 2006
Location: England
Device: Sony PRS-505, iPad, Kindle 3
|
Updates: Added Thumbnail generation from first Comic image. Added LRF number of colours option. Trivial clean-up fixes
|
05-29-2007, 02:15 PM | #8 |
Guru
Posts: 714
Karma: 1014039
Join Date: May 2007
Device: Sony PRS-500, Sony PRS-505, Kindle 3, Sony PRS350, iPad 64GB
|
As I'm working on my own tool with imagemagick myself: a few tips.
Remember to use trim and fuzz (15%) to trim out unneeded borders. Also, you might want to use some filters when resizing too. catzom works great. My result as far: https://www.mobileread.com/forums/showthread.php?t=11152 |
05-29-2007, 06:16 PM | #9 |
Addict
Posts: 205
Karma: 317
Join Date: Oct 2006
Location: England
Device: Sony PRS-505, iPad, Kindle 3
|
athlonkmf, cheers, I'm already doing that but haven't heard of catzom - can't find anything about it.
|
05-30-2007, 02:40 PM | #10 |
Addict
Posts: 205
Karma: 317
Join Date: Oct 2006
Location: England
Device: Sony PRS-505, iPad, Kindle 3
|
Update: Fixed path to ImageMagick "convert" program
|
06-04-2007, 12:07 AM | #11 |
Blueberry!
Posts: 888
Karma: 133343
Join Date: Mar 2007
Device: Sony PRS-500 (RIP); PRS-600 (Good Riddance); PRS-505; PRS-650; PRS-350
|
The samples look great! Good work!
-Pie |
06-04-2007, 05:58 AM | #12 |
Addict
Posts: 205
Karma: 317
Join Date: Oct 2006
Location: England
Device: Sony PRS-505, iPad, Kindle 3
|
I'm not sure how the Reader does it but I've found images convert best if they use 32 to 64 colours (well, OK shades of grey). The display is only supposed to support 4 colours but either this isn't true or the Reader uses some clever dithering.
|
06-04-2007, 07:15 PM | #13 |
Resident Curmudgeon
Posts: 76,435
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Clever dithering. And yes it does look like more then 4 shades. I'm impressed.
|
06-07-2007, 05:31 AM | #14 |
Addict
Posts: 250
Karma: 1232346
Join Date: Jul 2006
Location: Macau
Device: Kindle Oasis (plus lots of older devices)
|
WOW! This works great! Thanks very much for doing this.
Some notes from a first time user of this program. 1. If there is a space in the .cbr or.cbz filename, you have to rename the comic file with underscores or get rid of the spaces or it won't work. If you have a lot of files with spaces, this can be a pain. 2. The completed file outputs to a place where many users may not be able to find. It outputs to a hidden folder. A method to choose where the completed file is sent would be nice. 3. If you could set this up to do batch files, it would be fantastic. You could leave it on all night and have quite a pile finished the next morning. 4. Maybe you could show some examples of the option usage. -c. What is the range of values you should use? These are not complaints, just suggestions. This is a great program you have written and I thank you for doing so. |
06-07-2007, 05:28 PM | #15 |
Addict
Posts: 205
Karma: 317
Join Date: Oct 2006
Location: England
Device: Sony PRS-505, iPad, Kindle 3
|
Space is handled in the filenames, you just need to surround the filename with double quotes, which is standard for Windows. I usually just drag the file from Windows Explorer into the command window.
I'll look into the batch processing and the destination directory would probably be better to be the same as the source file. The -c option really doesn't need to be used, you can just reduce the number of colours to save space. The default of 64 colours works about best but you don't need anymore. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Conversion of comics (CBR/CBZ) | FangornUK | Conversion | 269 | 09-06-2012 12:43 AM |
PDF -> JPG -> CBZ -> LRF | leveck | Workshop | 13 | 06-16-2011 12:21 PM |
Best (approximately 7 inch) sub-250$ reader for color comics (unzipped CBR/CBZ)? | Neole | Alternative Devices | 15 | 05-15-2011 06:02 PM |
how to read / convert comics (.cbz) | cybmole | Calibre | 8 | 10-04-2010 04:16 AM |
CBZ > LRF (LRF>HTML/MOBI????) | sideburnt | Calibre | 4 | 09-15-2009 07:44 AM |