View Full Version : comiclrf - Comics(CBZ) to LRF converter


Pages : [1] 2

FangornUK
05-26-2007, 03:10 PM
UPDATE ComicLRF has now been added to kovidgoyal's Calibre (http://www.mobileread.com/forums/forumdisplay.php?f=166). 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 (http://en.wikipedia.org/wiki/Comic_Book_Archive_file)

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 (http://zodiacstuff.sf.net/misc/comiclrf-WINDOWS.zip)

Download Mac OS X version comiclrf-OSX.tar.gz (http://zodiacstuff.sf.net/misc/comiclrf-OSX.tar.gz) (it appears to require Leopard)

Download Linux version comiclrf-LINUX.tar.gz (http://zodiacstuff.sf.net/misc/comiclrf-LINUX.tar.gz)


Some samples; first one fills screen, second preserves aspect ratio

kovidgoyal
05-26-2007, 03:16 PM
Why don't you make this cross platform by using libprs500 as the backend?

FangornUK
05-26-2007, 03:27 PM
Here's a snapshot (http://zodiacstuff.sf.net/misc/scrsony.jpg)

FangornUK
05-26-2007, 03:31 PM
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.

kovidgoyal
05-26-2007, 03:44 PM
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.

FangornUK
05-29-2007, 08:05 AM
Updates: Added CBR support. Added Aspect Ratio preserve option. Added user Title and Author options. Added Normalise image option

FangornUK
05-29-2007, 12:51 PM
Updates: Added Thumbnail generation from first Comic image. Added LRF number of colours option. Trivial clean-up fixes

athlonkmf
05-29-2007, 02:15 PM
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: http://www.mobileread.com/forums/showthread.php?t=11152

FangornUK
05-29-2007, 06:16 PM
athlonkmf, cheers, I'm already doing that but haven't heard of catzom - can't find anything about it.

FangornUK
05-30-2007, 02:40 PM
Update: Fixed path to ImageMagick "convert" program

EatingPie
06-04-2007, 12:07 AM
The samples look great! Good work!

-Pie

FangornUK
06-04-2007, 05:58 AM
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.

JSWolf
06-04-2007, 07:15 PM
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.
Clever dithering. And yes it does look like more then 4 shades. I'm impressed.

Tom Swift
06-07-2007, 05:31 AM
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.

FangornUK
06-07-2007, 05:28 PM
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.

FangornUK
06-08-2007, 08:56 AM
New Release: Comic output LRF file is now written to same directory as the Comic Book. Added batch processing, you can now use multiple files on the command line

Tom Swift
06-08-2007, 09:46 PM
I tried the new program and received an error. My command line was c:/comiclrf.pl -n "*.cbr"

I had six different cbr files in the directory and I noticed that it seemed to be converting all six together into one large file, instead of six different files. Did I set up the command line wrong?
After it finished, it gave me this error message...

"This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.
LRS2LRF failed! at c:\Documents and Settings\.......\comiclrf.pl line 172"

I am going to try some variations on how I set up the command line and see what happens.

Tom Swift
06-08-2007, 09:52 PM
I tried the same command line but without the " " and with only two files to save time. I still received the same error message and I noticed that it was taking the two files and processing them alphabetically, instead of by file. For example, it processed the first page of the first comic book, then the pages of the second comic book, then the rest of the pages of the first comic book. The images in the .cbr file are named funny, which doesn't matter when using the reader program, but it messes up the processing. I will try some more variations.

Tom Swift
06-08-2007, 10:03 PM
Okay, I tried putting two file names on the command line, one after the other. It worked on the first and then gave me the same error message. I used wildcards in the file names because I was too lazy to write out the entire file. I then tried it on one file, no wildcards, and it worked. I then tried it on two files, no wildcards and it also worked. So, don't use wildcards. :)

Is there a way to have, say, 50 cbr files in the directory and then have the command line read c:\comiclrf.pl -n *.cbr and that would process the entire directory? Typing in every filename on the command line would take a while, especially if you have hundreds of files in a directory.

Or am I just using the wildcard function wrong?

The file does output to the input folder, which is great.

FangornUK
06-09-2007, 02:10 PM
New Release: Added filename wildcard support

Tom Swift
06-09-2007, 10:04 PM
Thanks, worked great.

One more suggestion (man, I am sounding demanding). Sometimes a directory may have both .cbr and .cbz files. Would it be possible to have it able to accept both in a command line wildcard?

For example , comiclrf.pl -n *.cb*

I tried this and the .cbr files worked but the output of the .cbz files were little 15k files. This is not a big deal since I can always separate the different files and then run two batches but it would be a nice feature.

Tom Swift
06-09-2007, 10:12 PM
Strange. I just tried to convert the .cbz files by themselves and they remained small. Also, one of them converted a different file instead of the one I selected to convert.

FangornUK
06-10-2007, 07:40 AM
No problems with me using "*.c*". Looks like you've got some images "ImageMagick" doesn't like, possibly corrupt?

Tom Swift
06-10-2007, 09:38 AM
That could be. I tried the batch in a different folder and everything worked fine.

This is a great program. Thanks again for writing it and making it available.

sonofjorel
06-19-2007, 08:05 PM
I'm completely new to this but would love to read comics on my reader. I downloaded all the programs needed to convert .cbz to .lrf but cannot for the life of me figure out how to do it. I'm using Windows XP--how to do you open a command prompt in the comiclrf directory? :blink:

Once I am able to open the command prompt I don't think I'll have any problems (knock on wood).

FangornUK
06-20-2007, 05:38 AM
Well you could try Google first as there are over a million hits on this subject.

You could create a shortcut with the following command (change the directory to suit):
cmd /k "cd c:\utils\comiclrf\"

sonofjorel
06-20-2007, 10:44 AM
Thanks! OK, I got the command prompt but am still not getting it to create the lrf file.

The command prompt I get is: c:\comiclrf>
My .cbz file is just in my c: drive (not in any folder like My Documents or anything) so after the prompt I type: comiclrf.pl "c:\Outsiders048.cbz" but the only thing that happens is the comiclrf.pl notepad file opens.

I have the ImageMagick program where it should be (in Program Files) and comiclrf and Perl programs are both in my c: drive (not under program files or anything like that). Is there something simple I should be doing that will get it to work or am I really off the mark?

As I said before--total noob trying to do this so any help is appreciated.

FangornUK
06-20-2007, 11:07 AM
Reinstall Perl as described in the README.txt and choose the default options. Try rebooting after that.

sonofjorel
06-20-2007, 09:26 PM
Thank you! I don't know what I did before but I just uninstalled everything, reinstalled it all, rebooted, and have converted 2 files! I was going to try to do a batch but to be honest, I'm just excited that it worked at all.

Many thanks for creating something like this. My reader is probably going to get worn out a lot faster now.

Lime2K
06-30-2007, 05:25 AM
I'd like to thank you for this tool as well -- it takes less time to convert manga with this tool than feeding the files to Acrobat and then pdfRastafarian - and they look better too!

(goes back to reading manga now ^_^)

melksnor
07-24-2007, 05:58 PM
I had an error, here is the log file, what am i doing wrong?

Input File Name : C:\DOCUME~1\melksnor\LOCALS~1\Temp\comiclrf\maus_1 .lrs
Output File Name : C:\Documents and Settings\melksnor\Desktop\comiclrf\maus_1.lrf
Validation check start.
Validatoin check finished.
Validate book information file.
Complete validation check.
[Error ] Can not find thumbnail image file.
[Error ] Can not create LRF Header
Invalid file.
Error termination
Delete file :: C:\Documents and Settings\melksnor\Desktop\comiclrf\maus_1.lrf

FangornUK
07-25-2007, 05:48 AM
Did you run this in the comiclrf directory?

melksnor
07-25-2007, 10:53 AM
Yeah, in command prompt, i do cd C:\Documents and Settings\melksnor\Desktop\Sony\comiclrf
first and then i type

comiclrf.pl "C:\Documents and Settings\melksnor\Desktop\Sony\comiclrf\maus_1.cbz"

it starts coding and then it outputs this:

Converting Comic "maus_1"...
Extracting...
Converting LRS to LRF...
XYP version: 1.0
End.
Processing Complete
LRF written to "C:\Documents and Settings\melksnor\Desktop\Sony\comiclrf\maus_1.
lrf"

but the file is never there, the whole proces happens quite fast btw, like it is done within two minutes

FangornUK
07-26-2007, 11:33 AM
Try putting comiclrf.pl into a directory with no spaces, i.e. c:\utils\comiclrf\

xikky
07-27-2007, 02:12 AM
I keep getting an error:

Converting Comic "XXXXXXX"...
Extracting...
The system cannot find the path specified.
Convert failed! at C:\comiclrf\comiclrf.pl line 124.


I'm running Windows XP Pro SP2, ImageMagick-6.3.5-3-Q16 (installed in c:\imagemagick), ActivePerl 5.8.8 (installed in c:\Perl) and comiclrf (installed in c:\comiclrf) trying to convert a file named 326-350.cbr.

Any troubleshooting tips?

seveng
07-30-2007, 12:27 AM
Anyone run in to an issue with the script only processing the first and last X pages and skipping the rest? I tore apart the CBRs and it turns out the covers and inner art were .jpg, and the meat of the comic was .gif. It looks like comiclrf doesn't know how to handle it. Unfortunately I don't know enough perl to try and fix it myself. Anyone else run in to this issue? Also, how does the output quality of this compare to manga2ebook, run through rasterfarian? I'd prefer a one step script like this, but quality matters quite a bit.

FangornUK
07-30-2007, 11:24 AM
seveng, comiclrf doesn't currently support gif images. It looks to be very easy to add though, I'll have a look.

FangornUK
07-31-2007, 05:50 AM
Updated: Added support for GIF images. Better sorting of images, now uses original archive ordering instead of alphabetical. Cleanup temporary directory before processing images. Download latest from link on first page.

Seant018
07-31-2007, 11:17 PM
I am getting the same problem as the user above

Converting Comic "XXXXXXX"...
Extracting...
The system cannot find the path specified.
Convert failed! at C:\comiclrf\comiclrf.pl line 124.

Is there something we are doing wrong here?

FangornUK
08-01-2007, 05:14 AM
What is the full command line you used?

Seant018
08-01-2007, 05:47 AM
first I change directories into the comiclrf folder. Then I use the command line comiclrf.pl c:\comiclrf\test.cbr

Test.cbr is the name of the comic, c:\comiclrf is the directory where the comiclrf files are.

banjopicker
08-01-2007, 10:55 PM
Thrilled with comiclrf, though I find that I have issues when using wildcards that are solved by copying the comiclrf files into the directory of the cbr/cbzs that I am converting.

Any clues why resizing for landscape mode doesn't work properly? It would be nice to get the resolution right so that we could read some comics in landscape mode--my eyes ain't what they used to.

Thanks again for creating this. It was exactly what I was looking for.

visionarycat
08-03-2007, 02:51 AM
I keep getting an error:

Converting Comic "XXXXXXX"...
Extracting...
The system cannot find the path specified.
Convert failed! at C:\comiclrf\comiclrf.pl line 124.


I'm running Windows XP Pro SP2, ImageMagick-6.3.5-3-Q16 (installed in c:\imagemagick), ActivePerl 5.8.8 (installed in c:\Perl) and comiclrf (installed in c:\comiclrf) trying to convert a file named 326-350.cbr.

Any troubleshooting tips?

ComicLRF is configured for ImageMagick-6.3.4-8-Q16 and since you're running ImageMagick-6.3.5-3-Q16, ComicLRF can't find ImageMagick and can't convert any images. I had the same problem but it's easily fixed.
1) In windows explorer, open the comiclrf folder
2) Right-click comiclrf.pl and choose "Edit" to open comiclrf.pl in Notepad
3) In the "User Configurable Area" you'll see: my $convertprog="C:\\Program Files\\ImageMagick-6.3.4-8-Q16.
4) change "my $convertprog="C:\\Program Files\\ImageMagick-6.3.4-8-Q16" to "my $convertprog="C:\\Program Files\\ImageMagick-6.3.5-Q16"(or wherever you have imagemagick installed. ex. "C:\\imagemagick")
5) save changes in notepad.
6)????
7)PROFIT!
(sorry, I couldn't resist not doing that last part :grin2:)
Hope this is helps.

FangornUK
08-03-2007, 07:17 AM
Updated: Now searches for the ImageMagick convert program, no need to edit the "convertprog" variable now.

Recommend you upgrade to the latest ImageMagick program, v6.3.5, as it has support for multi-cpu processors, doesn't appear to speed up the resizing much though.

FangornUK
08-03-2007, 07:19 AM
banjopicker, I haven't figured out how LRF handles landscape resolutions, I'm not sure it is actually possible as it seems to ignore setting the resolution to anything other than Portrait sizes.

seveng
08-03-2007, 11:18 AM
Woah, talk about fast turn around, thanks Fangorn!

xikky
08-04-2007, 12:54 AM
Thanks to visionarycat for the solution and thanks to FangornUK for updating the app!

Works like a charm!

Any chance of adding chaptering? Or is there a way to define chapters after an .lrf is created?

seveng
08-04-2007, 01:43 PM
Sweet, that worked great. One slight bug that won't matter since I'm more interested in reading the manga, the covers (the only jpgs in each archive) aren't getting processed. I'll PM you a url to one of the cbrs in case you want to play with it.

visionarycat
08-04-2007, 06:33 PM
I haven't figured out how LRF handles landscape resolutions, I'm not sure it is actually possible as it seems to ignore setting the resolution to anything other than Portrait sizes.

What I do is use an image viewer/editor and rotate the images that are landscape to portrait before sending the files to ComicLRF. It is tedious to extract the files and than rotate the landscape images one by one, though.:tired:
Would there be a way for ComicLRF to rotate the image that are landscape to portrait before it processes the image?:pray: That seems to be the best way to handle this issue.

FangornUK
08-06-2007, 07:44 AM
Updated: Put file ordering back to alphabetical, most Comics appear to use this order. Added auto image rotation for landscape images.

seveng, your problem was due to the file ordering I used in the last release, those missing images were actually at the end of the LRF. Fixed that in this release.

visionarycat
08-06-2007, 11:33 PM
Thanks for the update! It works a lot more seamlessly now, and my mangas look beautiful on my reader:tup:

irishjew
08-18-2007, 02:39 AM
Anyone get this error?

C:\Files\comic>C:\Files\comic\comiclrf.pl C:\Files\comic\test.cbz
Converting Comic "test"...
Extracting...
Can't locate object method "extractTree" via package "Archive::Zip::Archive" (pe
rhaps you forgot to load "Archive::Zip::Archive"?) at C:\Files\comic\comiclrf.pl
line 123.

FangornUK
08-18-2007, 07:39 AM
Looks like you didn't install the ActivePerl as specified in the README? This comes with the required Perl libraries as default, with other alernative Perl distributions you'll need to install the required libraries like Archive::Zip.

irishjew
08-19-2007, 01:45 AM
I have ActivePerl installed. Do I need to configure it or something?

irishjew
08-19-2007, 06:55 PM
Never mind. I reinstalled ActivePerl and it works just fine now.

visionarycat
08-21-2007, 11:44 PM
Is there any chance of possibly having PNG support in the future? 'cause that would be a great help.

FangornUK
08-23-2007, 09:37 AM
PNG support is already there.

visionarycat
08-23-2007, 10:46 PM
Whenever I try to use convert png images I get the following message:
convert: no decode delegate for this image format 'C:\....\temp\comiclrf\page_01.png'
convert: missing an image filename 'LibrieImgTumb.gif'
ImageMagick failed, path set wrong? at C:\comiclrf\comiclrf.pl line 179
I've tried reinstalling ImageMagick, but I get the same error message.

banjopicker
08-25-2007, 01:51 AM
I have had the best success with comiclrf when I install its files into the directory of the .cbr files that I am about to convert.

When I instead run comiclrf from its own directory, I have problems making wildcards work.

To get around the wildcard problem I am trying to instead call comiclrf from the command line while in the directory of comics that I want to convert, but then the script fails because the other apps comiclrf needs for the conversion are not in the path (like UnRar.exe). Would it be possible to change the script so that it explicitly uses the path for these apps so that we could call the script from another directory? I wish I knew enough to do it myself, but I suspect this might help others as well and could make the script more robust. Don't hesitate to correct me if I am missing something obvious that makes this unnecessary.

Thanks. I love this script. It really has made my Reader much more versatile.

FangornUK
08-25-2007, 09:05 AM
visionarycat, works fine for me. Can you send a sample that fails?

banjopicker, can you post a typical command line that fails?

nesagwa
08-27-2007, 06:21 PM
Can you explain the syntax for how to use the -t and -a options?

Ive tried both of these ways:

comiclrf.pl -t "Comic Name" "C:\Comic.cbz" and
comiclrf.pl "C:\Comic.cbz" -t "Comic Name"

Both with and without quotes. Im obviously doing something wrong.

banjopicker
08-31-2007, 11:55 PM
visionarycat, works fine for me. Can you send a sample that fails?

banjopicker, can you post a typical command line that fails?
Sorry for the delay Fangorn, I will get command lines and outputs to you sometime this weekend.

JSWolf
09-01-2007, 12:44 AM
Sorry for the delay Fangorn, I will get command lines and outputs to you sometime this weekend.
Have you by any chance tried PDFLRF (http://www.mobileread.com/forums/showthread.php?t=13135&highlight=pdf%3Brf)? It does support .cbz. I would be really interested in how well it handles .cbz.

Tom Swift
09-24-2007, 11:30 AM
FangornUK, is there any way to have the program convert a batch of cbr/cbz files into one large lrf file? It would be great to have one large file on the Reader instead of lots of individual files.

FangornUK
09-24-2007, 02:50 PM
Is that really useful? Most of my Comic files are very large and combining them would probably make them too big. I think it is 64MBytes limit but I might be wrong. It would mean a major rewrite to do that anyway.

Tom Swift
09-24-2007, 07:04 PM
I agree, too many is not practical. I was thinking about doing 10 issues per file, that way it is more organized on the Reader and just looks more clean. Not a big deal, just the organizational freak in me wanting folders and sub-menus on the Reader.

iyamapotato
09-26-2007, 12:57 AM
Just wanted to give a big thanks to FangornUK. comiclrf is the only thing that let me painlessly convert scanlations. I tried Manga2Ebook and another one or two and they all mangled the output into lrf's that are nowhere as good as the ones I get with comiclrf. And the alternatives took so much more effort for a poorer reading experience.

athlonkmf
09-26-2007, 03:09 AM
Just wanted to give a big thanks to FangornUK. comiclrf is the only thing that let me painlessly convert scanlations. I tried Manga2Ebook and another one or two and they all mangled the output into lrf's that are nowhere as good as the ones I get with comiclrf. And the alternatives took so much more effort for a poorer reading experience.

Funny you said that, as Manga2Ebook converts to pdf only and not directly to lrf.

iyamapotato
09-26-2007, 09:47 AM
Funny you said that, as Manga2Ebook converts to pdf only and not directly to lrf.

I ran them through PDFRead afterward. I also tried JE Comics and JAP (Just Another Printer). Various issues included not being able to center justify the page, extra whitespace and dissatisfaction with image quality regardless of settings.

athlonkmf
10-01-2007, 06:45 AM
I ran them through PDFRead afterward. I also tried JE Comics and JAP (Just Another Printer). Various issues included not being able to center justify the page, extra whitespace and dissatisfaction with image quality regardless of settings.

that's more because you don't know the correct settings for pdfread then.
For starters, don't let it autocrop.
And besides, rasterfarian was and is still recommended above pdfread.

There is a reason why manga2ebook only makes pdf-files....

cacapee
10-01-2007, 12:40 PM
Try out pdflrf. I've added a bunch more options for processing comic files. I'm interested in any feedback.

Lemurion
10-30-2007, 09:48 AM
I have to give kudos to comiclrf, it works like a dream. I haven't got the reader yet but I was able to batch convert a bunch of comics and the B&W output looks great on the connect desktop reader.

This program's one of the things that's making the Sony Reader that much more viable a choice for me.

lockery
11-11-2007, 05:05 PM
Hello All, I am having problems running this program. I have installed the perl per the readme using the default directory. I have installed ImageMagick-6.3.6-10 using defualt setup. Comiclrf is in C:\comiclrf

I have run the command:

comiclrf.pl "c:\comiclrf\test.cbr" and I get the following error:

Unknown open() mode '>:raw:encoding(UTF16-LE):crlf:utf8' at D:\comiclrf\comiclrf
.pl line 152.

any ideas?

Thanks,
Lockery

FangornUK
11-12-2007, 10:09 AM
You installed ActivePerl with all the default options?

lockery
11-12-2007, 11:30 AM
Correct. I have tried running it from c and d drive. the above error message came from running on d drive. I am not familiar with perl, so I am not sure what the above message is stating.

FangornUK
11-13-2007, 08:44 AM
You get the same error when using the C: drive?

lockery
11-13-2007, 09:50 PM
Yes,

Here is the error message I get when using the c drive:

Unknown open() mode '>:raw:encoding(UTF16-LE):crlf:utf8' at C:\comiclrf\comiclrf
.pl line 152.

FangornUK
11-16-2007, 04:47 PM
No idea what's wrong. I installed the latest version of ActivePerl and comiclrf still works fine.

NigelS
12-11-2007, 12:59 PM
Hi

Just installed all the support stuff & tested your ComicLrf script. I ran a 25 page Marvel comic through it "Ultimate Fantastic Four 024.cbr" (the comic displays fine using CDisplay).

The script ran through & apparently processed each of the 25 pages separately (giving a one-line progress report for each jpg file it processed). Then it successfully created "Ultimate Fantastic Four 024.lrf" the Sony Reader file. The only error msg was regarding there being no TOC.

However, when I viewed the lrf in the lrfViewer (part of libprs500), only the Odd Numbered pages were present in the lrf file - all the Even Numbered pages were missing!!

Any ideas what went wrong?

NigelS

FangornUK
12-13-2007, 08:34 AM
NigelS, I'd need the CBR file to check what is happening. Have you tried Sony's official reader with this file?

NigelS
12-13-2007, 08:50 AM
Well it seems it is just the LRF viewer (part of libprs500) which is having the problem! I don't know why I didn't try it on the Sony eReader but now I have, and the comic displays all 25 pages as it should. So clearly no problem with your conversion software.

Unfortunately, the Marvel comics are near-A4 size and conversion to Sony LRF format leaves a page which to my eyes is unreadable (same problem as with A4 PDF conversion). So sad to say, I guess I won't be reading Marvel comics on my Sony PRS505.

Cheers
NigelS

kovidgoyal
12-13-2007, 02:17 PM
Interesting, can you send me one of these problematic LRF files.

NigelS
12-13-2007, 04:29 PM
I have sent you email with a link to the file.

Cheers
NigelS

ChronoStriker1
01-01-2008, 01:20 AM
Is there anyway to get normal zip and rar files use the script? I just don't feel like renaming my files (an extra step that doesn't seem necessary).

Lemurion
01-02-2008, 03:24 PM
it only takes a couple of seconds to rename the files -- just open a command window in the relevant directory and type "ren *.zip *.cbz or ren *.rar *.cbr and it will change them easily enough.

plasticbugs
01-08-2008, 03:48 PM
I'm attempting to run comiclrf on both of my Macs (a G4 PPC running 10.4 and an Intel Mac running 10.5) but am coming up with the same error when processing any of my CBZ files:

LRS2LRF failed! at comiclrf.pl line 238

The script works just fine and processes all of the pages but fails when converting LRS to LRF. Any ideas?

I'm running perl v5.8.7 under Macports. Thanks in advance.

EDIT: I now see I need an LRS to LRF binary for OS X. I'll start looking. Thanks.

FangornUK
01-08-2008, 04:05 PM
Let me know if you find a Mac OS X binary, I didn't think one was available. Shame there doesn't appear to be a cross platform LRS2LRF tool.

jhempel24
01-22-2008, 03:46 AM
I've got to second the batch processing into one file. I'm trying to get my Ultimate X-Men comics to be in "Graphic Novel" style order so that 25 comics will only show up on 4 or 5 lines. I'm trying to just add the files to a zip or rar file, but they seem to want to organize my files for me instead of keeping they way they were put in. Any thoughts from anyone on this?

jhempel24
01-22-2008, 04:14 AM
EDIT: Nevermind, I found that if I check "use full path" in the WinZip box, it will keep duplicate file names.

Gideon
01-23-2008, 01:21 AM
Any chance we'll see a setting for the files to be configured to work best with landscape mode?

I find myself using that more and more often, but the quality goes down a bit when I do.

Beautiful, beautiful program though. I am astounded just how useful the reader is with all these great apps!

FangornUK
01-25-2008, 07:30 PM
Thanks Gideon. I haven't found a way to create landscape comics that use the full resolution, not sure it is possible with LRF files. Currently they are Portrait resolution and zoom up in landscape mode.

FangornUK
02-02-2008, 12:21 PM
Updated: Now uses libprs500 for the "lrs2lrf" utility, cross platform compatible (now works on Mac OS X).
Added Sharpen filter, makes text more readable. On by default.
Border trim is now more rigorous.
Normalize filter is now on by default.
Performance tweak for ImageMagick.

Note: If upgrading from previous versions of comiclrf, make sure "lrs2lrf.exe" in the comiclrf directory is deleted. Make sure you use libprs500 v0.4.35 or later.

Tested with Windows and Mac OS X. Can't test on Linux as I couldn't get libprs500 installed on Ubuntu.

nhamze
02-09-2008, 04:35 PM
Ok I got everything installed but it give me the error imagemagick failed wrong path set. I noticed that the perl script is point to c:\program files, what do I change that line to on a mac. I installed IM via macports and I left it on the default settings. If anyone could help me I would really appreciate it

Nick

FangornUK
02-10-2008, 03:06 PM
You haven't installed ImageMagick properly on the Mac, it needs to be in your PATH. Follow the ImageMagick installation instructions from the ImageMagick (http://www.imagemagick.org/script/binary-releases.php#macosx) site and get the binaries. The MacPort version doesn't appear to install correctly.

nhamze
02-12-2008, 12:34 AM
I got all my problems figured out and I have to say thanks this is the best program I have ever used the manga looks great, keep up the good work.

SurgE
02-13-2008, 12:08 AM
Hi, great job on the program!

Update: Issue resolved by changing script's encoding to utf-8

Thanks a lot of reading :)

FangornUK
02-15-2008, 07:52 AM
Updated: Bug fix for libprs500 and a fix for the temporary directory.

Recommend you get this version.

OUTATIME
02-23-2008, 08:32 PM
Any chance of a GUI version?

I'm practically wee-tah-ded with this compooter stuff.

FangornUK
02-27-2008, 03:10 PM
GUI's are for wimps. Drink a few bottles of Guiness and give it a go.

mazzeltjes
02-27-2008, 03:35 PM
I'm A Wimp
please give me a GUI
:D:D:D

OUTATIME
02-27-2008, 06:50 PM
GUI's are for wimps. Drink a few bottles of Guiness and give it a go.

No thanks.

I have a job, a girlfriend, books to read, social engagements, keys... I'm a fully-functional human being with a full plate; I've not the spare time to learn command line code interface doohickeys.

:bookworm:

tompe
02-27-2008, 07:03 PM
Go and read In the beginning was the Command Line:

http://www.cryptonomicon.com/beginning.html

I have the opposite problem compared to many people in this thread. If i have to do something in a GUI it usually takes much more time than doing something similar without a GUI so it is nearly always very frustrating to use a GUI.

phurren
03-17-2008, 05:48 PM
Hi there. I'm having problems getting this to work. I've followed all of the instructions but when I try to run through the command line I get the following error:

RAR failed! at C:\comiclrf.pl line 138

Any ideas why this might be?

Thanks in advance.

FangornUK
03-18-2008, 07:58 AM
Could be any number of things; can't find UNRAR (which is included with the program), corrupt CBR/RAR file, not a CBR/RAR file. What command line did you use, what Operating System. Change the file extension to .RAR and test with WinRAR.

phurren
03-18-2008, 01:50 PM
Thanks for the reply. Here's my thoughts...

UNRAR is in c:\ along with comic.lrf and the cbr file.

cbr file is not corrupt - it opens fine in CDisplay, and also fine when I change the file extension to rar and open it with Winrar.

I am using Windows XP. I used the command prompt and moved to c:\ then typed the following:

comiclrf.pl "test.cbr"

and that is when I got the error.

FangornUK
03-18-2008, 05:32 PM
what about:
comiclrf.pl c:\"test.cbr"

phurren
03-18-2008, 05:48 PM
Thanks, just tried it, but came up with the same error.

Ryan2065
03-19-2008, 10:38 AM
I am getting the same error as phurren. I downloaded a pack and the first 3 .cbr files went through comiclrf just fine but now it doesn't seem to work on any of the other .cbr files in the pack. I've used it to convert other comics with no problems and it is currently converting some other .cbr files I have... I'm not really sure what is going on with it. I've changed the file name of the cbr file to take out the spaces, deleted the comiclrf files and re-copied them, moved the cbr file from the d drive to c and even to the directory in c that holds comiclrf but nothing seems to work with this file. I've also tried using the *.cbr command and test.cbr but both still give me the error.

I don't have a cbr viewer but 7zip has no problems opening it and all the pictures display fine when it is unzipped.

You have made a great program though! Great job on it.


C:\utils>comiclrf.pl "c:\test.cbr"
Converting Comic "test"...
Extracting...
RAR failed! at C:\utils\comiclrf.pl line 138.

Ryan2065
03-24-2008, 12:11 PM
After finding a few more comics with this same error I'm starting to think the problem is with the comic file and not the program. I'm seeing this error alot with comics that won't open in a comic viewer or comics that won't load one or two pages in the comic viewer. There still are one or two comics that open without error in the comic viewer program but get this error but I'd still say they are the files fault and not the program. I just extract the image files and re-make the comic and then all is good.

FangornUK
03-24-2008, 12:20 PM
Perhaps the comic files have subdirectories?

mimoviz
03-24-2008, 03:12 PM
Dear Farngorn: I seem unable to make your wonderful script to work. This is the output and it always happens whenever it reaches the fourth file of any cbr.
Output:
dbe495437:~ mimoviz$ perl comiclrf.pl Akira01.cbr tes.lrf
Converting Comic "Akira01"...
Extracting...
Processing 1 of 182 "Akira - I - 001.jpg"
Processing 2 of 182 "Akira - I - 002.jpg"
Processing 3 of 182 "Akira - I - 003.jpg"
Processing 4 of 182 "Akira - I - 004.jpg"
convert: geometry does not contain image `/tmp/comiclrf/Akira - I - 004.jpg'.
ImageMagick failed, path set wrong? at comiclrf.pl line 218.

The path is Ok. In fact I have tried the convert command by hand using the same options as per comiclrf in line 218 and it works flawlessly. So am still confused.
Could you help me? :help:

Thanks

BTW: I run an OSX Tiger machine. I downloaded and installed imagemagick myself in /usr/local/bin and it is accesible from any terminal.

FangornUK
03-24-2008, 06:31 PM
Not sure what's wrong. You're calling comiclrf.pl incorrectly but I don't see how that would cause it to fail. Use: 'perl comiclrf.pl Akira01.cbr'

mimoviz
03-25-2008, 12:42 PM
Not sure what's wrong. You're calling comiclrf.pl incorrectly but I don't see how that would cause it to fail. Use: 'perl comiclrf.pl Akira01.cbr'

Same thing happens.... I dont know why. If there was something wrong in the path then the individual commands wouldn't work right?
See... this is what happens:
dbe495437:~ mimoviz$ perl comiclrf.pl Akira01.cbr
Converting Comic "Akira01"...
Extracting...
Processing 1 of 182 "Akira - I - 001.jpg"
Processing 2 of 182 "Akira - I - 002.jpg"
Processing 3 of 182 "Akira - I - 003.jpg"
Processing 4 of 182 "Akira - I - 004.jpg"
convert: geometry does not contain image `/tmp/comiclrf/Akira - I - 004.jpg'.
ImageMagick failed, path set wrong? at comiclrf.pl line 218.

I have checked both convert and identify binaries...they work well... perhaps there are some library dependencies that are not working? I wonder how can I tell?
Do you happen to know how to uninstall perl completely from terminal in a mac? It is not the Activestate version, just a plain simple port for darwin.
:help:

Thanks

mimoviz
03-25-2008, 02:20 PM
Ok. I installed ActivePerl and its fully functional. But the problem remains... :blink: My current guess it must have something to do with imagemagick, but I am still at loss.
perhaps the name of the files with spaces between the numbers?
perhaps something else?

mimoviz
03-25-2008, 03:31 PM
I did it! I just had to update a library within /sw/lib and everything was smooth. Thanks... The problem was in Imagemagick after all...
Thanks man
:thanks:

mimoviz
03-25-2008, 03:44 PM
Ahh... come on... this is just awful. when I thought everything was OK I have a new issue here: could you look at the code and surmise what is happening?

Processing 182 of 182 "Akira - I - 182.jpg"
Converting LRS to LRF...
Traceback (most recent call last):
File "/Applications/libprs500.app/Contents/Resources/lrs2lrf.py", line 8, in <module>
from libprs500.ebooks.lrf.lrs.convert_from import main
File "libprs500/__init__.pyo", line 30, in <module>
File "PyQt4/QtCore.pyo", line 18, in <module>
File "PyQt4/QtCore.pyo", line 11, in __load
ImportError: dlopen(/Applications/libprs500.app/Contents/Resources/lib/python2.5/lib-dynload/PyQt4/QtCore.so, 2): Symbol not found: __cg_TIFFSetErrorHandler
Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /opt/local/lib/libTIFF.dylib

LRS2LRF failed! at comiclrf.pl line 247.

x5nder
03-26-2008, 10:52 AM
I have a feature request. Looking in your README.TXT I see the following 'feature':

Added auto image rotation for landscape images.

What I would really like, as these rotated images usually turn out too small to read, would be for your program to automatically split landscape images in half and encode them as two seperate pages. Would that make sense? I, for one, would love it!

Xombie
03-30-2008, 03:00 AM
Ahh... come on... this is just awful. when I thought everything was OK I have a new issue here: could you look at the code and surmise what is happening?

Processing 182 of 182 "Akira - I - 182.jpg"
Converting LRS to LRF...
Traceback (most recent call last):
File "/Applications/libprs500.app/Contents/Resources/lrs2lrf.py", line 8, in <module>
from libprs500.ebooks.lrf.lrs.convert_from import main
File "libprs500/__init__.pyo", line 30, in <module>
File "PyQt4/QtCore.pyo", line 18, in <module>
File "PyQt4/QtCore.pyo", line 11, in __load
ImportError: dlopen(/Applications/libprs500.app/Contents/Resources/lib/python2.5/lib-dynload/PyQt4/QtCore.so, 2): Symbol not found: __cg_TIFFSetErrorHandler
Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /opt/local/lib/libTIFF.dylib

LRS2LRF failed! at comiclrf.pl line 247.

Hi. Try this. Open up the comiclrf.pl file and go to line 218. Change...

system("\"$imagemagick\" -size ".$scrwidth."x".$scrheight." \"$fromfile\" $rotate -fuzz 40% -trim +repage $im_param -type grayscale -colors $colours \"$tofile\"") == 0 || die "ImageMagick failed, path set wrong?";

...to...

system("\"$imagemagick\" -size ".$scrwidth."x".$scrheight." \"$fromfile\" $rotate -fuzz 40% $im_param -type grayscale -colors $colours \"$tofile\"") == 0 || die "ImageMagick failed, path set wrong?";

That gets rid of the -trim function so it's not a permanent fix. However, most of the people that put out manga already trim their pages. Well, the decent/good groups, I suppose.

I had the same initial problem as you (geometry does not contain image) and removing trim fixed it without the need for installing any other software like ActivePerl, etc... I'm on Ubuntu 7.10 if it helps.

I may spend more time investigating if nobody else figures it out in the meantime.

Good luck!

nrapallo
03-30-2008, 11:17 PM
:offtopic:
Sorry for butting in here, but those who want to try a new Comic (CBZ/CBR) to lrf converter may want to try PDFRead 1.8.1 which was just released in the Content forum. Input support for .CBZ/.CBR was recently added in addition to pdf/djvu/tiff/imglist. Output Profiles have been provided for the Sony PRS-500 and PRS-505 based on past discussions here and elsewhere.

PDFRead 1.8.1 can be found here (http://www.mobileread.com/forums/showthread.php?t=21906).

While it may require the (free) eBook Publisher software installed, it allows for Cropping, rotating, dilating (thickening the text) and edge enhancing with colors/grayscale from 2 to 256! It also outputs in various landscape and portrait modes to suit your needs.

I'd be interested in some feedback if the default settings are to your liking. Please respond in the PDFRead 1.8.1 thread (http://www.mobileread.com/forums/showthread.php?t=21906) so as to lessen the impact here.

Thanks in advance!

mimoviz
03-31-2008, 12:08 AM
Xombie: Thanks for your input. I finally solved the problem. It was not on the code or the software. In fact, the issue has to do with some idiosyncrasies of OSX... whenever it finds more than 1 library, even they are the same version, the execution stops.
I had to read a LOT to get here, and it was so simple after all...

Thanks to all of you guys for your support. :thanks:

Synthesis
05-18-2008, 09:12 PM
Thanks for the program for single inputs! ...except for the problem I have with batch converting. I do the normal comiclrf.pl "C:\Conversions\*.cbr" but it seems to combine all my comics together and it gives me an error IOError" [Errno 2] No such file or directory: ... LRS2LRF failed! at C:\Conversions\comiclrf\comiclrf.pl line 247.

Am i doing something wrong? The readme doesn't offer much help with batch coverting and I can't find anything in these threads to help.

FangornUK
05-19-2008, 06:08 AM
No idea what's wrong, your batch conversion command line looks fine. There's nothing special to doing a batch conversion. Possibly something wrong with your comic files or there's too many files in the directory.

serpentium
05-27-2008, 02:55 PM
Xombie: Thanks for your input. I finally solved the problem. It was not on the code or the software. In fact, the issue has to do with some idiosyncrasies of OSX... whenever it finds more than 1 library, even they are the same version, the execution stops.
I had to read a LOT to get here, and it was so simple after all...

Thanks to all of you guys for your support. :thanks:

Hi,
could you share with other mac user the perl file you changed... and maybe few instructions how to install correctly imagemagick?

i tried by myself a little bit but...it wasn't so clear...
:thanks:

netrider11
06-05-2008, 02:16 AM
FangornUK, thanks for the wonderful script. It works well for me! The image quality is very good.

Not sure if this has been asked before, is it possible to add "manga split" mode? to the script. Many of my cbz and cbr files are manga with 2 pages in 1 jpg. If you can give me some pointers on how to doing it, that will great!

Thx

FangornUK
06-05-2008, 05:32 AM
Yes, it's a good idea. I'm planning to implement it but haven't had any spare time recently.

fake-name
06-07-2008, 08:05 AM
The new version of comicLRF is refusing to generate .lrf files for me. it processes the cbr file fine, and even claims to have written the cbr file, and terminates with no error. However, there is no lrf file anywhere (ran complete search on drive).

I have comiclrf at "c:\perl\comiclrf\comiclrf.pl"
Working in directory "c:\comics"

Command line is: comiclrf.pl -r "C:\Comics\GunnerkriggCourt.cbr"

File has 412 jpg images.

Interestingly, if I go back to an older version of comiclrf (update: 20070806, contains independant lrs2lrf.exe), it works fine. Could the conversion of libprs500 to calibre have screwed something up?


Also, is there any plan to support a TOC? For big files (e.g, 1000+ images), some form of navigation would be really nice. CDisplay grabs any text file in the .cbr file. Perhaps you could implement some form of lightweight markup language in a included text file.
A simple tab delimited, line break separated format could work, and be easily human-readable to boot.

FangornUK
06-07-2008, 10:19 AM
fake-name, that's a lot of images in a single file, in theory it should work fine but the resultant LRF file maybe too large than what is supported. I've tested the latest version of libprs500 (i.e. Calibre) and it works fine for me.

FangornUK
06-07-2008, 10:21 AM
Update:
Added, long overdue, automatic landscape image splitting into two portraits.

Download latest version from the usual place, i.e. link is on the first page.

fake-name
06-07-2008, 08:40 PM
I don't know, I've successfully converted a 173 mb cbr file containing 1642 images with the 20070806 version with no issues. That includes uploading and testing (e.g. reading) on a PRS-505.

I'll try the new version, and get back to you.

Not sure if it's relevant, but the 20070806 is tolerant of spaces in the path to the perl file, whereas the current version requires a path with no spaces. That's a little annoyinf because putting the .pl file on the desktop breaks it.

Edit: the 20080607 (current version) seems to be working again. Tested it on a 134 image archive with no problems, am currently testing it on aformentioned 1642 file archive.

Would it be too much to ask for you to ad a revision number to comiclrf? It would make referring to a specific version much easier.

netrider11
06-07-2008, 08:59 PM
Thank you very much for the splitting option! Today is my lucky day! :)

fake-name
06-07-2008, 09:23 PM
Ok, the current version is functioning fine. Whatever was disagreeing with my computer is now fixed. It processed the 1642 image, 173 mb archive fine (apparently, if the lrf file has limitations, they're far larger than thought).

As an aside, the Calibre lrf viewer cannot handle files longer than 996 pages. Anything longer gets truncated. However, they still function fine on a PRS-505.

Before someone asks, I'm converting webcomic archives. I read quite a few webcomics, and the ability to put them on the PRS-505 has made the device far more enjoyable for me.

I just wanted to say thank you for ComicLRF.

FangornUK
06-08-2008, 05:36 AM
fake-name, you're possibly near the 64MBytes limit LRF files have. I put comiclrf on my desktop and it works fine, no problems with spaces for me. Make sure you put double quotes around the Comic file though. The version number is the date.

fake-name
06-08-2008, 08:17 PM
fake-name, you're possibly near the 64MBytes limit LRF files have

Uh... what?

I have several lrf files that are 100+ mb that work perfectly. LRFViewer (the software that comes as part of calibre) may be limited to 64 mb, but the PRS-505 is not.

FangornUK
06-17-2008, 01:27 PM
Updated: Version 2.0 released
Rewrote completely in Python to enable threading of image processing and easier crossplatform compatibility - plus a way for me to learn Python!
Python version only written for Windows, OSX and Linux to follow.
Multi-threading of image processing has doubled speed on multi-core CPUs.
Less agressive image trimming to avoid "geometry does not contain image" error.
no longer uses Calibre (libprs500).
Now an executable with an easy (setup.exe) installation

Currently this version is only for Windows; OSX and Linux are almost there but need a bit more work - my first Python program so be patient :) This version is much easier to install and run as it is an executable (it's compiled Python)

kovidgoyal
06-17-2008, 04:24 PM
Nice. You may want to consider using the ctypes module to directly call functions in the imagemagick dll without the overhead of launching a separate process. See for example the libwand module in calibre that provides a basic interface to imagemagick

FangornUK
06-18-2008, 06:33 AM
Thanks kovidgoyal, I'll take a look. I'm finding the library stuff and the cross-platform stuff the hardest thing to work out with Python, the language itself is quite excellent though!

kovidgoyal
06-18-2008, 11:49 AM
Yeah cross platform is a pain. You may also want to look at the Python Imaging Library. It should allow you to do the transforms easily in python, without relying on an external imaging library. If you need any help with the cross platform stuff, just ask, I have a good deal of experience with it.

FangornUK
06-19-2008, 01:17 PM
I would have liked to use the Python Imaging Library but it misses a few vital functions that ImageMagick provides. Thanks for the pointers on the ImageMagick libraries, there's no mature interface for Python but I've managed to coble together a suitable interface, that now works well, from various sources. Also the ImageMagick documentation is almost non-existent when using the API.
I'll PM you if I have any questions, I'm particularly interested in cracking OS X support next.

Lime2K
06-19-2008, 07:46 PM
I second the OSX support - if you need a guinea pig, just let me know!

hoodaman
06-21-2008, 11:35 PM
this program is very nice. I was unsure of the capability of the prs505 to display comics but after putting a moon knight book on it and reading through it, I'm very impressed. Good work.

fake-name
06-28-2008, 01:27 AM
Well, I can confirm that the 64mb limitation is completely false.

Using the new pythin version of comiclrf, I have been able to generate a 4615 page, 251,386 kb .lrf file that works perfectly on my prs-505.

It's an archive of Dilbert comics, 1990 to 2005, incidentally.

FangornUK
06-30-2008, 04:17 PM
Update: Version 2.1 released

Python version now works on Mac OS X and Linux.
Now uses built in ImageMagick library and does not use external installation (except Linux)
ImageMagick processing now thread based instead of external process, slightly faster.
Added output directory (-o) option where LRFs are written to.


If you installed previous versions you can uninstall ImageMagick as the latest version has the libraries built-in (except for Linux).

kovidgoyal
07-01-2008, 09:19 PM
On linux the most robust way to load the magickwand library would be


ctypes.cdll.LoadLibrary(ctypes.util.find_library(' MagickWand'))

FangornUK
07-02-2008, 11:03 AM
Thanks for the info kovidgoyal. Unfortunately they changed the library naming from Wand to MagickWand etc recently so my version tries to access either.

kovidgoyal
07-02-2008, 11:11 AM
Well, in that case



lib = ctypes.util.find_library('MagickWand')
if not lib: lib = ctypes.util.find_library('Wand')

serpentium
07-02-2008, 01:18 PM
Update: Version 2.1 released

Python version now works on Mac OS X and Linux.
Now uses built in ImageMagick library and does not use external installation (except Linux)
ImageMagick processing now thread based instead of external process, slightly faster.
Added output directory (-o) option where LRFs are written to.


If you installed previous versions you can uninstall ImageMagick as the latest version has the libraries built-in (except for Linux).

Hi, i was so happy to know u finally compiled your program in osx (i red great comments on your software).
But i uncompressed it and it doesnt work... i just said
>ERROR: Can't load ImageMagick Library /Applications/Multimedia/ebook/comiclrf/ImageMagickOSX/lib/libWand.dylib

i tried to run the program from outside the folder and inside the directory and subdirectories... but still doesnt work...

i want to try it! :help:

FangornUK
07-03-2008, 08:45 AM
Did you extract everything out of the TAR and all subdirectories? Also is X11 installed? Think ImageMagick might need that but I'm not sure.

Can you see the file "/Applications/Multimedia/ebook/comiclrf/ImageMagickOSX/lib/libWand.dylib"

SurgE
07-03-2008, 11:57 AM
here's an error:

Extracting...

Traceback (most recent call last):
File "comiclrf.py", line 363, in <module>
File "comiclrf.py", line 298, in runcomic
File "comiclrf.py", line 153, in processcomic
IOError: [Errno 2] No such file or directory: 'c:\\users\\user\\appdata\\loc
al\\temp\\tmp2ovzox\\001/01.jpg'

------------------------

I am using the latest version on windows vista. The application died when the cbz file itself has a folder structure inside.

serpentium
07-03-2008, 02:11 PM
Did you extract everything out of the TAR and all subdirectories? Also is X11 installed? Think ImageMagick might need that but I'm not sure.

Can you see the file "/Applications/Multimedia/ebook/comiclrf/ImageMagickOSX/lib/libWand.dylib"

i see .dylib file and others... i have x11 installed...
:)

FangornUK
07-04-2008, 02:58 PM
Update: Version 2.2 released

Mac OS X version fixed
Fix handling of CBZ files that contain directories

serpentium
07-04-2008, 06:12 PM
Update: Version 2.2 released

Mac OS X version fixed
Fix handling of CBZ files that contain directories


Now it works on my OSx (Leopard).
It's really great software.

I hope you will insert it in calibre (maybe a pop up saying "thanks to the author for the plugin"?) to convert cbz to lrf directly there.

NOTE: previously i saw in mobileread (http://www.mobileread.com/forums/showthread.php?t=23048) a piece of software to cut properly images to fit better sony reader... they are too big for my eyes; so i was thinking... could u use the code (gpl license) in your beautiful program to make it my second and last useful software (first is still calibre!!!!)?
maybe big expectations :)

FangornUK
07-05-2008, 08:46 AM
Feel free to use the code.

krighton
07-06-2008, 12:02 AM
i'm probably missing something, i've read the readme.txt but can't figure out the command line for doing a batch of files all at once...could someone please post the exact command line for converting a batch of files that are all in the same location...right now i'm just dragging and dropping files one at a time into the cmd window....i'm using windows also.

ah, comiclrf *.cbr seems to be working....

krighton
07-06-2008, 09:34 AM
i'll have to keep reading, the program crashes when it's trying to convert the 10th file......also when enlarging the size of the comic via the reader, is it possible to scroll across the entire comic, or do you need to read it in actual size....haven't found the button combination that lets you move around the page (if that's possible).

FangornUK
07-06-2008, 12:05 PM
Update: Version 2.3 released
Fixed memory leak with ImageMagick, causing ComicLRF to crash after multiple Comics converted.

Krighton, this will fix your crashing. You can switch to landscape mode on the reader and move up and down the zoomed image. I don't know if you can do that in portrait mode.

klikklak
07-07-2008, 07:27 AM
Thanks for the great tool, I think it'll give new life to my 500.

Anyway, since this wasn't mentioned in the thread here's a tip on how to do whole directories. (I hope I didn't do any errors, the rename's could probably be done better, but it seems to work)

find . -name '*cb?' -print0 | xargs -0 -i comiclrf {}

to rename:
find . -name '*zip' -print0 |xargs -0 -i rename 's/\.zip/\.cbz/' {}

and to copy
find . -name '*lrf' -print0 |xargs -0 -i cp {} /media/disk-1

and to remove [text]
find . -name '*cb?' -print0 |xargs -0 -i rename 's/(\[(.*)\])//' {}

a question: I seem to get errors with some files, is archived subdirectories support coming soon? (I'm presuming that is what causes the errors)

klikklak
07-07-2008, 08:52 AM
Sorry about double posting, but I couldn't find edit.

It wasn't the subdirectories in archives, it handles those fine.
It however looks like it hangs on [Lasher99] in the filename. Perhaps you could add code to properly escape []'s.

FangornUK
07-07-2008, 05:59 PM
klikklak, I'm not sure what you mean. Do you mean single quotes in comic filenames or the image filenames inside the archive? I tried both these and they work on Windows.

klikklak
07-08-2008, 06:11 AM
I mean the comic .cbz filenames. The error it gives is the ERROR: No valid file to process,
which according to the code is only when the given filelist is 0 (if I interpreted that correctly). Anyway, this is repeatable and easily fixed by removing square brackets from the filename.

I've been also getting errors with THUMBNAIL, but I haven't been able to isolate that.

SurgE
07-09-2008, 11:34 AM
hey dude, great work :)

Just checking. When you extract cbr/cbzs, do u sort them first by folder than by filename?
i.e

- folder 001
- - file 01
- - file 02
- folder 002
- - file 001
- - file 002

I noticed that the conversion utility is converting them by filename sequence, ignoring the directories they were previously in. Is it possible for the application to first sort the files by directory then by filename?

FangornUK
07-10-2008, 11:56 AM
I never knew archives would have that format, I've never seen that before. I'll look into fixing it.

GolfClap
07-10-2008, 08:32 PM
Hi. I believe its great sofware but I failed to launch it: then I write to command line comiclrf and pressed enter screen shows up but after second it disappeares... I can not even drag and drop files in this screen.. Please help me
:thanks:
(I am on Win Xp)
oh, i have found that i cn just drag file to exe file.
But now i dont know how to use options (-r, -s, etc.)...

FangornUK
07-11-2008, 10:00 AM
Looks like you haven't opened a command prompt and just started ComicLRF from the Start Menu "Run" window.

Press "Window key and R", then enter "cmd". A command prompt starts. Then in the command prompt window enter "comiclrf" and it should display some help.

GolfClap
07-15-2008, 05:25 PM
powerful tool :thumbsup:

but today i got an error: local variable "thumbnail" referenced before assigment. What does it mean? :thanks:

FangornUK
07-16-2008, 05:50 AM
No idea, I'd need more information and preferably the comic file it fails on.

acidzebra
07-20-2008, 11:50 AM
Awesome tool, just like the gutenlrf was awesome!

Thanks!

EDIT: actually, the windows version works just fine, but the linux version hangs on the "processing 2 of X" for any comic I try to convert. Nothing but a "kill -9" will stop it.

nindustrial
07-20-2008, 12:08 PM
thank you for this great tool! i am getting a weird error in the Mac version when trying to pass arguments to the tool.

osxmachine:dir$ ./comiclrf convertme.cbr

seems to work fine, and starts to extract and process. but;

osxmachine:dir$ ./comiclrf -r -l convertme.cbr

does not work, and instead results in:

osxmachine:dir$ ./comiclrf -r -l convertme.cbr
option - not recognized

Usage: comiclrf [options] [comic.(cbz|cbr)]...
Version: 2.3 (20080706)
Options:
-a [AUTHOR] Override the Comic Author
-t [TITLE] Override the Comic Title
-o [DIR] Output directory for generated LRF Book. Default: Comic directory
-c Number of colours for Greyscale image conversion. Default: 64
-n Disable Normalise (improve contrast) colour range for pictures. Default: On
-r Maintain picture aspect ratio. Default: Off (i.e. fill screen)
-s Disable sharpening. Default: On
-l Disable Landscape image splitting into two Portraits. Default: On

Pass it the full path and filename to the Comic (CBZ,CBR) file
e.g. comiclrf.pl "c:\downloads\Simpsons 01.cbz"

what am i doing wrong? am i passing the arguments wrong? syntax?

Kandid
07-20-2008, 11:25 PM
Hi FangornUK, thanks for this wonderful software.

Can you add an option that crops to the border of the comics, removing any headers or footers. I have multiple comics that have a page number at the bottom wasting a lot of precious pixels to render the comics on my device.

Maybe I am off topics and tools already exist to detect and remove them.

Thanks!

FangornUK
07-21-2008, 08:35 AM
Update: Version 2.4
Now handles CBR & CBZ files with multiple subdirectories and processes
with correct ordering

acidzebra, no idea, works fine for me on Ubuntu. What version is ImageMagick, i.e. "convert --version"?

nindustrial, that is "-l" and not "-1"? It'll take me a bit of time to test the OS X version.

Kandid, it already auto trims the page but stops at any sort of text/image it finds as it couldn't possibly detect headers and footers - they are just images.

acidzebra
07-21-2008, 08:51 AM
Hi Fangorn, thanks for responding.

I'm running Fedora Core 8, and ImageMagic reports
"Version: ImageMagick 6.3.5 09/20/07 Q16 http://www.imagemagick.org"
it came from the official Fedora repository, and there is no newer version available.

If you think that is the cause of the issue, I can try a compile from source?

Just compiled ImageMagic from source, convert --version now tells me
"Version: ImageMagick 6.4.2 07/21/08 Q16 OpenMP http://www.imagemagick.org"

But the behavior remains the same - after or during "processing 2 of X" it hangs and only kill -9 will terminate the process, nothing else.

nindustrial
07-21-2008, 02:24 PM
nindustrial, that is "-l" and not "-1"? It'll take me a bit of time to test the OS X version.

Thanks FangornUK,

I thought of that too, and tried all the variants I could, -r alone, -l alone (the letter L), some of the other arguments. Seems like any passed argument on the Mac OS X version results in the error, maybe its not being parsed by the system properly from the command line? For now, I'm just editing the comiclrf.py file to change the defaults of -r and -l to what I want, and running the script with no passed arguments (i.e. "comiclrf converme.cbr", and its working out fine.

Thanks for looking, and again, thanks for maintaining a wonderful utility. Let me know if I can help with your testing in any way; I'm not a programmer, but don't mind doing some testing if you need..

FangornUK
07-21-2008, 05:47 PM
nindustrial, I forgot to put a tiny fix in the calling script for OS X. I've put it in now, please re-download the OSX ZIP.

FangornUK
07-21-2008, 05:50 PM
acidzebra, I haven't got a clue what is wrong there, works fine for me. As a work around try adding the following after line 128:
cpunum = 1

acidzebra
07-22-2008, 05:28 AM
acidzebra, I haven't got a clue what is wrong there, works fine for me. As a work around try adding the following after line 128:
cpunum = 1

Hey, that worked like a charm!

uname -a reports "2.6.24.7-92.fc8 #1 SMP i686 i686 i386 GNU/Linux", it is a core duo system, and I have no problems with other software that are multiprocessor-aware. Weird, but still, you fixed it :)

:thanks:

nindustrial
07-22-2008, 05:40 PM
nindustrial, I forgot to put a tiny fix in the calling script for OS X. I've put it in now, please re-download the OSX ZIP.

works great now FangornUK, thanks for the quick fix!

klikklak
07-22-2008, 06:59 PM
Hey,

could you add a 'manga mode' to the program, so that when it splits dual page splashes it would count pagenumbers from right to left? I've been reading GTO which was scanned dual pages on one image, and while they split ok (and it's a great feature, I couldn't get this done with je-comics this easy), it's kind of annoying seeing the 'later' frames on a page before the 'earlier' ones.

FangornUK
07-23-2008, 06:28 AM
klikklak, I'm not sure what you mean. You mean when the page is split you want the right part of the split to come before the left part of the split?

klikklak
07-23-2008, 06:13 PM
Yes, exactly that.

acidzebra
08-04-2008, 08:09 AM
Some more observations on comiclrf:

First off, it is a great program and I owe you many thanks, Fangorn.

That said, here is some weirdness and shameless feature requests:
a) the linux version will fail to convert a file if the filename contains characters like "[" and "]" - the windows version just plods on regardless.

b) While mass-rename of extension is certainly possible, I would like this script to be less picky about .cbr and .cbz (and accept .zip and .rar) - from my perspective, it should assume all these are valid files. I had a bunch of files which were zipped archives with the .cbr extension instead of .cbz. I couldn't figure out why comiclrf wouldn't convert them until I examined them close-up. Again, renaming files is trivial but it would be nice if comiclrf just tries to process the files instead of just telling me it is not a proper file. Especially when it is :)

c) I would like to add my vote for a "-m" option for Manga :)

FangornUK
08-04-2008, 10:02 AM
The "[" "]" problem is because they are identified as wildcard characters and comiclrf tries to expand them using glob. It's perfectly normal to use a wildcard of "comic[12].cbr" to expand to "comic1.cbr", "comic2.cbr" in Unix. I wouldn't recommend using "[" "]" in filenames but that doesn't help you much.

The "Manga" option for landscape splitting is being worked on. I've no spare time at the moment.

kovidgoyal
08-08-2008, 05:02 PM
As per FangornUK's request, comiclrf has been merged into calibre. You can access it from the command line using the command comic2lrf

It has also been integrated into the GUI, so you can do all the usual conversion/bulk-conversion operations on CBR/CBZ files.

Note that the code is a complete re-write, so there are probably still bugs.

acidzebra
08-08-2008, 05:15 PM
That is totally awesome!

jakewastaken
08-12-2008, 02:02 PM
I'm checking out a little of the first part of the Watchmen right now using this conversion :) Thank you!



I think this is great so long as you read comics where color is not integral to the story. Black and white manga is probably very workable.


I just read my first comic on the reader and I'm really excited. This adds a whole new level of material for me to get lost in. Woop woop!

I just started reading my first manga ever (pback or ebook) and it looks absolutely amazing on the reader.

lineager
08-16-2008, 12:48 AM
The comiclrf is simple and great!
I can convert comic with good quality output on the reader.
But I face a problem that the chinese title cannot be shown on the reader.
Does comiclrf only support english title ?

FangornUK
08-16-2008, 07:27 AM
I'm not sure about Chinese, probably not. Have you tried the Calibre version (http://www.mobileread.com/forums/showthread.php?t=27783) of ComicLRF (comic2lrf), that version has now replaced this older version.

lineager
08-16-2008, 01:45 PM
One more question.. can I specify the page order (from Right to Left) when splitting a single large image into 2 images during the conversion ?

The default direction is split page from left to right which is opposite to japanese comic page order

kovidgoyal
08-16-2008, 02:22 PM
One more question.. can I specify the page order (from Right to Left) when splitting a single large image into 2 images during the conversion ?

The default direction is split page from left to right which is opposite to japanese comic page order

That option will be present in the next release of calibre

acidzebra
08-16-2008, 02:49 PM
So, for the record, has development on the stand-alone script now halted and is FangornUK maintaining the integrated version or are you?

jakewastaken
08-16-2008, 04:55 PM
Calibre just keeps getting better and better!

kovidgoyal
08-16-2008, 05:19 PM
We're both maintaining the new version :) My calibre wide development policy is to accept patches from anyone (with a little review). But ultimate responsibility for maintaining the code base is mine.

Opsy
08-23-2008, 08:45 PM
Hello, firstly I want to thank you for your program. It's great!

I suppose that your tool converts the images directly to size of the Sony Reader screen on portrait mode. Sometimes the text of the comics is almost unreadable in portrait mode and if you rotate to landscape the resolution is too low to read confortably.

Could you add an option to convert to landscape size?

FangornUK
08-24-2008, 08:01 AM
Opsy, I don't think it's possible to do that - I've tried to find a way to do it but I think the Reader just won't work that way.

acidzebra
08-24-2008, 08:25 AM
I've another request - I would like a commandline switch to set a custom cover image when creating the lrf file. I've noticed some irregularly-sized first images can sometimes upset the Sony reader, although Calibre and lrfviewer handle them just fine. Plus it is nice to be able to set your own title page.

FangornUK
08-27-2008, 08:17 AM
acidzebra, create a new ticket at http://calibre.kovidgoyal.net/ for any requests or fixes.

acidzebra
08-27-2008, 08:18 AM
Thanks, will do.

lineager
09-05-2008, 03:27 PM
That option will be present in the next release of calibre

When will the new Calibre release ? :thumbsup:

pilotbob
09-05-2008, 03:41 PM
When will the new Calibre release ? :thumbsup:

Kovid is still hammering out some things in the beta of the next versions. However, it is pretty stable and works well. You can get the link to it from the first message in this thread http://www.mobileread.com/forums/showthread.php?t=28467 .

As to when it will be released, I will leave that up to Kovid to answer. But, from what I have seen on the beta thread it is pretty close... I would guess maybe a week or so... unless he has more features he is working on that aren't in the beta yet. I think he intends to release this as 0.5 once it goes out.

BOb

kovidgoyal
09-05-2008, 04:18 PM
Once the betas have been stable for a couple of days (i.e. no more bug reports), I'll release it as 0.4.84. Once any remaining bugs in 0.4.84 are ironed out, I'll release 0.5

banjopicker
09-07-2008, 10:34 PM
Now that the 505 does ePub, would converting comics to ePub instead of lrf make full resolution in landscape mode possible?

FangornUK
09-08-2008, 10:02 AM
full resolution in landscape has been done for LRF, it will be in the next release of Calibre.

AndiR
09-08-2008, 11:31 AM
I am having trouble converting a PowerPoint file to CBZ and wanted to check out my process is correct

1 - Convert all slides into jpegs in a folder (with frames around them)
2 - Select slides and add to a .rar file
3 - Change the name to NAME.cbz
4 - Drag into Calibre
5 - Select document
6 - Click Convert ebooks -> convert individually
7 - Click accept
8 - Wait

I do all of the above and get the following error:

('UnknownFormatError', u'Could not find ebook in archive'):
Failed to perform job: Convert book: CTD_slides.cbz
Detailed traceback:
Traceback (most recent call last):
File "parallel.py", line 760, in worker
File "parallel.py", line 729, in work
File "C:\Archivos de programa\calibre\library.zip\calibre\ebooks\lrf\an y\convert_from.py", line 167, in main
File "C:\Archivos de programa\calibre\library.zip\calibre\ebooks\lrf\an y\convert_from.py", line 113, in process_file
UnknownFormatError: Could not find ebook in archive
Log:
Archive: c:\docume~1\andi\config~1\temp\calibre_0.4.83_6ql5 m1.rar
In Calibre (v.4.83)

I am running XP.

So what am I doing wrong?

This is my first play with Calibre :-( but otherwise it looks great!

Thanks, AndiR

FangornUK
09-08-2008, 11:48 AM
You created a RAR archive and named it CBZ, which is a ZIP archive. Either create a ZIP and give it the .CBZ extension or create the RAR and give it the .CBR extension.

If that doesn't fix it post us a screenshot of the archive contents as they are listed.

AndiR
09-08-2008, 01:59 PM
Thanks FangornUK.

That worked perfectly.

Interestingly I also placed the 57 slides as JPEGS in to the read, to see how it would react and it as fine, but the file version is about 5 times quicker!

A great new tool for my work as trainer / facilitator.

Thanks again, AndiR

banjopicker
09-09-2008, 09:23 AM
full resolution in landscape has been done for LRF, it will be in the next release of Calibre.

Neat. Thanks.

Kirtai
09-10-2008, 10:28 PM
What would be nice is to be able to convert multiple comics into one book with chapters the way manga graphic novels are. Being able to tag them as series so they automatically go into collections would be nice too.

Might be a reason for me to learn python...

TOPO
09-16-2008, 08:25 AM
full resolution in landscape has been done for LRF, it will be in the next release of Calibre.

First of all, Thank you Fangorn for your superb work on the ComicLRF... but... here is my request... :p

I don't like using Calibre (why? huh... I don't like the interface or maybe I'm a command line lover) so it'd be great to have the "full resolution in landscape" command line version as soon as possible.

It opens a brave new world of opportunities for not-manga-comics in my PRS-505. :2thumbsup

Thank you very much.

PS: ah! the "manga option" for splitting images will be great too ;)

FangornUK
09-16-2008, 08:56 AM
The Calibre version has a command line option, just use "comic2lrf". All the options in the GUI are available in the command line version. I never use the GUI either :)

You need v0.4.84 for the "full resolution in landscape" option. Also the "--despeckle" option is worth using all the time to clean up those grainy comics, if you've got a decent Processor.

I've no idea when Kovid will release v0.4.84 but you could use the beta version which looks pretty stable now: http://calibre.kovidgoyal.net/downloads/betas

TOPO
09-16-2008, 11:04 AM
I've just tryed it and it works GREAT! I've attached my first experiment... it's one of the short tales of the "LEVIATHAN" from D'Israeli published in 2000AD (a great story and a very good and personal drawing style), D'Israeli tends to use a very small font for his works so it's a good thing to try the new landscape feature... just pick it up and try ;)

Maybe there is still someone out there that doesn't know but... if you keep pressed the zoom button in the PRS505 you switch orientation on the fly... pretty usefull.

This feature is perfect to convert BIG comics and even RPGs (usually scanned as images and put toghether in a big PDF), I'm trying to convert from PDF to CBR and then to LRF with very good results.

All I can say is THANK YOU! :thanks:

dare99
09-16-2008, 01:58 PM
Top program. Cheers. I'm settling down to an evening of Zenith.

Mitchll
09-21-2008, 09:22 PM
I've just tryed it and it works GREAT! I've attached my first experiment... it's one of the short tales of the "LEVIATHAN" from D'Israeli published in 2000AD (a great story and a very good and personal drawing style), D'Israeli tends to use a very small font for his works so it's a good thing to try the new landscape feature... just pick it up and try ;)

Maybe there is still someone out there that doesn't know but... if you keep pressed the zoom button in the PRS505 you switch orientation on the fly... pretty usefull.

This feature is perfect to convert BIG comics and even RPGs (usually scanned as images and put toghether in a big PDF), I'm trying to convert from PDF to CBR and then to LRF with very good results.

All I can say is THANK YOU! :thanks:

TOPO,
I'm trying to convert a punisher cbr and get a black bar running from top to bottom to the right of the comic panel. What settings did you use for leviathon (which renders beautifully)?

Mitch

TOPO
09-22-2008, 03:52 AM
I got the same problem with other conversions... I think comiclrf can't figure out the right width for the document. I works for landscape in the same way that works for regular conversions, so it uses a fixed height for the document instead of a fixed width when working landscape.

Maybe Mr.FangornUK should have a look at it. I think this should work like that:

Regular document:
- With "keep aspect" option it adds left and right borders to the document.
- Without "keep aspect" option the page resizes to 600x800

Wide document:
- Allways mantains the aspect, and no matter how high the page is, the width is allways 800.

lineager
09-29-2008, 03:00 PM
Hi FangornUK,

Is it possible to add "--right to left" parameter to your ComicLrf ?
I know the latest version is Comic2Lrf, but the speed of ComicLrf is faster than Comic2Lrf on my P4 PC...:)

FangornUK
09-29-2008, 03:18 PM
lineager, really? by how much? Performance should be about the same as the hefty conversion code is pretty much the same.
I wasn't going to do anymore development on it.

lineager
09-29-2008, 04:04 PM
lineager, really? by how much? Performance should be about the same as the hefty conversion code is pretty much the same.
I wasn't going to do anymore development on it.

I just feel it make faster than comic2lrf.. I will test both speed later...

banjopicker
10-03-2008, 03:45 AM
Comic2lrf.exe now lets you zoom in on comics, but it seems like it is still converting them to the same resolution as before. Whenever I zoom, the zooms are pixelated and fuzzy. I know the resolution is there in the original cbz file, but the conversion seems to keep the resolution at the portrait mode setting even though it now lets you zoom. Here is the command I am using in XP:

"C:\Program Files\calibre\comic2lrf.exe" "Comic_about_an_aardvark.cbz" -r -w -d -l -a "Comic"

serpentium
10-26-2008, 01:44 PM
i know comiclrf means making .lrf files but i switched 2 weeks ago to ILIAD from my sony prs505 and now i cannot read lrf there.
Could you do put an option to make pdf instead of lrf? (i dont know how to send lrf to pdf printer with mac os x)

cheers

zefeng
12-29-2008, 04:19 PM
I really enjoy using comiclrf.
To make it better, is it possible to add a parameter to turn off "white edge cutting"? That is, simply treating the width of white edge as zero? When I was using comiclrf, sometimes it is intended to leave white space to express original feelings...
Thank you!

FangornUK
12-29-2008, 04:30 PM
Sure, just put a ticket request in here http://calibre.kovidgoyal.net/query

acidzebra
12-29-2008, 06:49 PM
I really enjoy using comiclrf.
To make it better, is it possible to add a parameter to turn off "white edge cutting"? That is, simply treating the width of white edge as zero? When I was using comiclrf, sometimes it is intended to leave white space to express original feelings...
Thank you!

I had that when converting some manga, where a white page with a single object would appear once in a while. Putting a border around those specific pages with imagemagick before converting to lrf solved the issue:
convert -border 2x2 -bordercolor "#000000" old.jpg new.jpg
This is easy to run as part of a batch job, too.

Now if only I could find a convenient way of cropping scanned-in page numbers automatically...

zefeng
12-30-2008, 10:09 AM
Many thanks!
acidzebra, try ChainLP. :)

acidzebra
12-30-2008, 06:13 PM
That, my new friend, is one awesome tool. It is a shame that is seems to be windows-only, I can't read the language that it is published in, the zip functionality seems to be broken on my system (I copied unzip32.dll to my system folder but that didn't seem to help), the LRF output seems to get me a non-working LRF but the sequential image output function works great and it seems to detect and remove those pesky page numbers without fail using the option "page revision - novel only".

Definitely a tool to watch. Cheers.

Matt Horne
01-26-2009, 04:18 PM
Hi,

Been trying this out.. very impressed :)

I cannot get wildcards to work at all with comic2lrf (the one with calibre)

comic2lrf testcomic*.cbr

Is there anything wrong with the above command line ? I just get a error when it says it cannot find testcomic*.cbr

Cheers

Matt

kovidgoyal
01-26-2009, 04:23 PM
comiclrf doesn't support batch conversion. Use the GUI for that

banjopicker
01-30-2009, 04:27 AM
Hi,

Been trying this out.. very impressed :)

I cannot get wildcards to work at all with comic2lrf (the one with calibre)

comic2lrf testcomic*.cbr

Is there anything wrong with the above command line ? I just get a error when it says it cannot find testcomic*.cbr

Cheers

Matt

For batch conversion of all cbz/cbr files in a directory you can make the following .bat file and run it in the directory of files that you want to convert. The reason it creates a temporary file is because using wildcards alone in the command line didn't handle paths with spaces in them very well. Hope this helps:

cls
dir /b *.cb* > dir.txt
For /F "tokens=* delims=" %%A in (dir.txt) Do call "C:\Program Files\calibre\comic2lrf.exe" "%%A" -w -l -a "Comic"
del dir.txt /F

Matt Horne
01-30-2009, 03:41 PM
Thats brilliant Thanks!... its been too long since I have done any msdos batch scripts :)

Matt Horne
01-30-2009, 04:02 PM
Comic2lrf.exe now lets you zoom in on comics, but it seems like it is still converting them to the same resolution as before. Whenever I zoom, the zooms are pixelated and fuzzy. I know the resolution is there in the original cbz file, but the conversion seems to keep the resolution at the portrait mode setting even though it now lets you zoom. Here is the command I am using in XP:

"C:\Program Files\calibre\comic2lrf.exe" "Comic_about_an_aardvark.cbz" -r -w -d -l -a "Comic"

Not sure I follow how are you zooming on the reader ? If I user the button for text size it does zoom in but only on the left top corner and I can see no way to scroll round the page. Landscape is pretty readable if I have used -w option but not as nice a read as the normal portrait style.

zx0550
03-01-2009, 04:08 AM
This is a great tool,I am using it to generate inuyasha for my 505.

etherspin
03-14-2009, 10:05 PM
how aggressive is the border removal ? Ive tried calibre on some .cbz files that had a border of about 10-15 percent page width, all in white space and when mobipocket was the output they seemed to remain with the white space..
other than that- great results

kovidgoyal
03-14-2009, 10:21 PM
It's a 25% fuzzy trim

etherspin
03-15-2009, 12:04 AM
up to 25% trimmed off and including colours similar to the border ?

kovidgoyal
03-15-2009, 12:10 AM
http://www.imagemagick.org/MagickWandForPHP/MagickTrimImage.html

etherspin
03-15-2009, 06:23 AM
thanks !! I'll get to work!

Evi1d33d
05-03-2009, 05:21 AM
Don't get why you can't convert plain .zip and .rar files. Renaming them is a pain.

stranjer
05-20-2009, 10:21 AM
many thanks for this little program,I don't know much about it yet as I just tried it yesterday but it does the job.

not sure if there are any options for renaming the files or to make the letters a bit bigger, but it looks really good.(I've converted Absolute Watchmen and the book between the chapters have a really small printing,you can still read it though)

thanks again, you guys are great!!

Evi1d33d
05-26-2009, 07:59 PM
Anyone know how to specify the number of shades? I tried '-c 16' but it just gave me an error when converting.

comiclrf -c 16 -n -r -s "D:\mangas\Eden\Eden_v14.cbz"
Converting "Eden_v14.cbz"...

Extracting...

Processing 1 of 234 'Eden14_Credits.jpg'
Processing 2 of 234 'Eden_v14_001.jpg'
Processing page split
Exception in thread Thread-1:
Traceback (most recent call last):
File "threading.pyc", line 488, in __bootstrap_inner
File "threading.pyc", line 448, in run
File "comiclrf.py", line 75, in imgconvert
ArgumentError: argument 2: <type 'exceptions.TypeError'>: wrong type

Traceback (most recent call last):
File "comiclrf.py", line 365, in <module>
File "comiclrf.py", line 303, in runcomic
File "comiclrf.py", line 221, in processcomic
File "comiclrf.py", line 92, in process_image
File "comiclrf.py", line 75, in imgconvert
ctypes.ArgumentError: argument 2: <type 'exceptions.TypeError'>: wrong type

komugi
06-19-2009, 11:35 AM
Works nicely for manga. Remember just put the images into a rar file, rename extension to cbr and let it go to town. If using zip file, use cbz, though I'm not sure if the extension changes the way the tool extracts it.

urahara454
07-04-2009, 07:15 PM
Traceback (most recent call last):
File "comiclrf.py", line 365, in <module>
File "comiclrf.py", line 303, in runcomic
File "comiclrf.py", line 260, in processcomic
File "pylrs\pylrs.pyc", line 1982, in __init__
File "pylrs\pylrs.pyc", line 90, in _checkExists
pylrs.pylrs.LrsError: file 'c:\users\chris\appdata\local\temp\tmpmcsxib\conv4 1.g
if' not found

Im gettings this error, its baffled me as this is the first error ive ever encountered with this software, this is for a manga called fairy tail, volume 10 of the manga, the other 9 have gone smooth, as have over 100 other volumes of manga ive converted for my reader, but I have no idea how to fix this. Any help would be greately appreciated

kovidgoyal
07-05-2009, 02:46 AM
open a ticket and attach the file that causes this error

urahara454
07-05-2009, 08:16 AM
the file is 34.7 MB, Im not sure I can upload it as the graph shows that .rar files are limited to 20 MB, any idea how I can upload bigger files?

kovidgoyal
07-05-2009, 11:19 AM
You'll have to find some web space where you can upload it and post a link to it

urahara454
07-05-2009, 11:30 AM
I believe ive figured it out, theres one file, a big image that comiclrf splits as its two pages of the comic, well im showing that thing vista says the file format is not supported, ive taken that out and the lrf has been created, sorry for bothering you before I had completely checked everything, you wouldn't happen to know how to fix imgaes like that? Its showing the iamge as 2.50k but the other iamges are around 200k

kovidgoyal
07-05-2009, 11:46 AM
You could just manually split the image and re-add it to the comic

Ryandsimmons
09-09-2009, 09:50 AM
I've been lurking here for a while, but decided to register purely to say thanks.

What a brilliant program, it has really made me enjoy my reader even more.

dreamers
09-10-2009, 06:28 AM
Hello. I just got my 505 and this program is a godsend as i have loads of comics.

i was wondering, in my cbr/cbz files i have directories in them. i was wondering if they could be used to help generate a TOC for the comic?

kovidgoyal
09-10-2009, 11:49 AM
calibre supports the CBC (Comic book collection) that allows for the creation of TOCs. A CBC is a zip file that contains individual zip files each witha set of comic pages,. Ina ddition it has a file comics.txt that contains a list lines like the following

comic1.zip:Chapter 1 of blah
comic2.zip:Chapter 2 of blah

and so on, where comic1.zip, comic2.zip are the zip files inside the cbc file

Kirtai
09-11-2009, 05:17 AM
calibre supports the CBC (Comic book collection) that allows for the creation of TOCs. A CBC is a zip file that contains individual zip files each witha set of comic pages,. Ina ddition it has a file comics.txt that contains a list lines like the following

comic1.zip:Chapter 1 of blah
comic2.zip:Chapter 2 of blah

and so on, where comic1.zip, comic2.zip are the zip files inside the cbc file
Excellent, I've been wanting something like this for a while.
Does the main file have to have a cbc extension?

dreamers
09-11-2009, 10:11 AM
calibre supports the CBC (Comic book collection) that allows for the creation of TOCs. A CBC is a zip file that contains individual zip files each witha set of comic pages,. Ina ddition it has a file comics.txt that contains a list lines like the following

comic1.zip:Chapter 1 of blah
comic2.zip:Chapter 2 of blah

and so on, where comic1.zip, comic2.zip are the zip files inside the cbc file

i cant get this to work.

this is my text file in the zip which

Chapter001.zip:Chapter 001 - Yoshimori and Tokine
Chapter002.zip:Chapter 002 - Scars
Chapter003.zip:Chapter 003 - Yoshimori's Ambition
Chapter004.zip:Chapter 004 - Human Ghost
Chapter005.zip:Chapter 005 - Nourishment
Chapter006.zip:Chapter 006 - A Dangerous Man
Chapter007.zip:Chapter 007 - The Flower of Passion

but it never creates a TOC just the lrf. i am using the latest version of calibre.

kovidgoyal
09-11-2009, 10:49 AM
Excellent, I've been wanting something like this for a while.
Does the main file have to have a cbc extension?

yes it does.

@dreamers: filename case is important, make sure it matches. and try epub output

dreamers
09-11-2009, 11:58 AM
epub worked fine. its just the image quality is not as great as in lrf. i can barely read any text in the comic. i can switch it epub to lrf and the quality is fine (albeit a bit smaller than the screen size), but there is 199 entry TOC.

kovidgoyal
09-11-2009, 12:25 PM
LRF doesn't support hierarchical TOCs and make sure your output profile is set to SONY for EPUB output