![]() |
#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 08:10 AM. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,265
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Why don't you make this cross platform by using libprs500 as the backend?
|
![]() |
![]() |
Advert | |
|
![]() |
#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.
|
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,265
Karma: 23661992
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 | |
|
![]() |
#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
|
![]() |
![]() |
![]() |
#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
|
![]() |
![]() |
![]() |
#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 |
![]() |
![]() |
![]() |
#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.
|
![]() |
![]() |
![]() |
#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
|
![]() |
![]() |
![]() |
#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 |
![]() |
![]() |
![]() |
#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.
|
![]() |
![]() |
![]() |
#13 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,690
Karma: 134319572
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.
|
![]() |
![]() |
![]() |
#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. |
![]() |
![]() |
![]() |
#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. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Conversion of comics (CBR/CBZ) | FangornUK | Conversion | 269 | 09-05-2012 11:43 PM |
PDF -> JPG -> CBZ -> LRF | leveck | Workshop | 13 | 06-16-2011 11:21 AM |
Best (approximately 7 inch) sub-250$ reader for color comics (unzipped CBR/CBZ)? | Neole | Alternative Devices | 15 | 05-15-2011 05:02 PM |
how to read / convert comics (.cbz) | cybmole | Calibre | 8 | 10-04-2010 03:16 AM |
CBZ > LRF (LRF>HTML/MOBI????) | sideburnt | Calibre | 4 | 09-15-2009 06:44 AM |