03-16-2010, 07:43 PM | #1 |
n00b
Posts: 19
Karma: 88
Join Date: Oct 2008
Location: Switzerland
Device: Sony PRS-505, iRex DR800SG
|
manga2cbz for iRex DR800
New version 1.1
'manga2cbz for iRex DR800S(G)' is a free & simple tool for converting manga and comics to view on the iRex DR800S(G). Features in v1.1: - Unpack folders or zip / cbz / rar / cbr files (or any mix of nested combinations) - Images: png, jpg, gif - Crop white borders - Rotate landscape images - Re-size images to match the screen resolution - Reduce colors to 4 - 256 levels of gray (additional library needed for < 256) - Save pics as png / jpg and pack them into a cbz file New: - XML configuration (see automatically generated 'config.xml') - Split landscape images. (enable in XML) - Combining split and rotate is possible too. (split then rotate) - Mulit-threading according to the number of CPUs available (or setting in XML) - Bugfixes Limitations & Bugs: - Still no split archives supported - Small bug with cropping Use it together with the AMAZING 'CBZ Document Plugin' written by Kolenka. see: Thread >>> You can enable much better compression (color depth reduction with Floyd-Steinberg dithering) by downloading the file 'gif4j_pro_trial_2.3.jar' from http://www.gif4j.com/download.htm and putting it into the same directory. <<< Usage: Just double click the jar to see the "GUI" Or by console: java -jar manga2cbz.jar sourceFileOrDir destinationDir Title XML configuration tags: --- cropThreshold: 1 - 255 (255 means completely white) threads: 1 - 16 (0 = automatic) splitLandscape: Works only if picture width is at least 2x screen width. LEFT = reading from left to right, RIGHT = reading from right to left, OFF = disabled rotateLandscape: Works only if picture width is bigger than picture height. CW = clockwise, CCW = counterclockwise, OFF = disabled type: JPG or PNG grayLevels: 4, 8, 16, 32, 64, 128 or 256 (smaller than 256 only works with the gif4j library) Entering wrong values causes the whole config file to be reset to default. --- This is still an early version. It may contain bugs and I won't take responsibility for damage of your hard- and software or any data loss. I tested it with a folder containing several rar files, which them-selfs contained further directories and a mix of png and jpgs, totally about 1000 pages (220mb). It took ~10min to unpack, convert and repack them on my Athlon 4400 (cbz size 138mb). Please share your suggestions for improvement here. Enjoy! Last edited by brookman; 03-18-2010 at 03:17 PM. Reason: new version |
03-17-2010, 02:16 AM | #2 |
Nevermore
Posts: 63
Karma: 10000
Join Date: Jan 2010
Location: the Flint Hills, KS
Device: ex-iLiad, DR800SG
|
Wow. You just saved me who knows how many hours of conversion work and halved the memory footprint of my comics folder, with better looking comics to boot (I've been using JE-comics).
I tested it on a set of zips containing 155 jpgs, 31.8MB total. Conversion took a couple of minutes and spit out a 22MB file. The generated cbz won't open in in CDisplay for me, but repacking it works. Thank you very much. |
Advert | |
|
03-17-2010, 05:39 AM | #3 |
n00b
Posts: 19
Karma: 88
Join Date: Oct 2008
Location: Switzerland
Device: Sony PRS-505, iRex DR800SG
|
|
03-18-2010, 12:41 AM | #4 |
Enthusiast
Posts: 36
Karma: 344
Join Date: Dec 2009
Device: Sony PRS 505, B&N Nook, Sony Daily Edition, iRex Reader
|
I wanted to thank you for taking the time to put this together. Comic and Manga fans everywhere send their appreciation. I am going to try it out.
|
03-18-2010, 12:44 AM | #5 | |
Enthusiast
Posts: 36
Karma: 344
Join Date: Dec 2009
Device: Sony PRS 505, B&N Nook, Sony Daily Edition, iRex Reader
|
Quote:
Sorry, can you explain this a little more. In what directory should I put this file? |
|
Advert | |
|
03-18-2010, 07:48 AM | #6 |
Fanatic
Posts: 556
Karma: 1102020
Join Date: Sep 2009
Device: Kindle Keyboard (rip), Kindle Voyage, Fire Tablet 10 '17, iPad '19
|
This works nicely with manga, though some color comics may be way too dark for a monochrome device. Thanks!
Suggestions:
|
03-18-2010, 12:45 PM | #7 |
<Insert Wit Here>
Posts: 1,017
Karma: 1275899
Join Date: Jan 2008
Location: Puget Sound
Device: Kindle Oasis, Kobo Forma
|
Nice tool, a couple of comments though:
- You don't need to target the usable size of the screen due to the scaling algorithm. I'd actually target the screen's actual size. This way you are guaranteed the image always scales down or is used as-is. Scaling up is what you'd want to avoid, and in landscape, it will scale up in many cases with the resolution you selected. - Don't need to auto-rotate either. There's pretty much no real performance savings doing this ahead of time, and it makes the resulting CBZ harder to read on other platforms (say, iPhone, a netbook, or what have you). - I'd offer the option to save as a baseline JPEG as well. These seem to load a bit faster than a PNG due to the larger file size of the PNG (on average). If the PNG file size is comparable to a baseline JPEG of the same output, then I probably wouldn't worry about it. Other than that, looks like a useful tool. I like to keep a single 'archival' copy of my CBZs, so I optimized the plugin to try to handle these full-size CBZs as well as possible... but anyone looking to save a few MB will like this tool, I think. |
03-18-2010, 03:13 PM | #8 | ||||||
n00b
Posts: 19
Karma: 88
Join Date: Oct 2008
Location: Switzerland
Device: Sony PRS-505, iRex DR800SG
|
Quote:
Quote:
Quote:
Quote:
I know, the selection criterion for rotation is somewhat stupid (rotate if width>height). Quote:
Quote:
|
||||||
03-18-2010, 03:26 PM | #9 | |
<Insert Wit Here>
Posts: 1,017
Karma: 1275899
Join Date: Jan 2008
Location: Puget Sound
Device: Kindle Oasis, Kobo Forma
|
Quote:
There are two types of JPEG. Baseline and Progressive. Progressive is the style used for images aimed at the web, so a rough version of the image can be displayed before the whole file is downloaded. The problem is that it has a huge perf hit on the iRex using GDK (on the order of 5x longer to load a progressive JPEG versus baseline). There should be some options to control it in the API you are using to get the image output, I think. And for CBZ files, there is no real reason to allow progressive JPEGs in the first place (since you already have the whole file on disk). |
|
03-18-2010, 04:31 PM | #10 |
n00b
Posts: 19
Karma: 88
Join Date: Oct 2008
Location: Switzerland
Device: Sony PRS-505, iRex DR800SG
|
I see! Thank you for the explanation. I'm using the the built-in javax.imageio.ImageIO.write() method. Progressive mode should be disabled by default. But the compression quality seems to be set only to 75%...
|
03-18-2010, 05:04 PM | #11 |
<Insert Wit Here>
Posts: 1,017
Karma: 1275899
Join Date: Jan 2008
Location: Puget Sound
Device: Kindle Oasis, Kobo Forma
|
75% is pretty high.... I can usually get away with 40-50% on mine.
|
03-19-2010, 04:12 PM | #12 |
Nevermore
Posts: 63
Karma: 10000
Join Date: Jan 2010
Location: the Flint Hills, KS
Device: ex-iLiad, DR800SG
|
brookman, is it possible to turn off crop altogether? See the attached images; I haven't tried v1.1 but I don't think it would catch this.
Kolenka, I like the idea of keeping a single version, but good scans have big file sizes (1+ MB for covers, 200-300KB for pages). Page turns for these are ~1 second as opposed to ~1/2 second for manga2cbz processed images. Plus, I go in and delete scanlation group credit pages, because these days I'm embarrassed to show a comic only to come across a pages that says: "TFT. We Love Beavers." That shoots the single version idea in the foot right there. |
03-19-2010, 04:25 PM | #13 | |
<Insert Wit Here>
Posts: 1,017
Karma: 1275899
Join Date: Jan 2008
Location: Puget Sound
Device: Kindle Oasis, Kobo Forma
|
Quote:
I keep around some high-quality scans myself, 500KB covers (in JPEG), and 200-500KB pages (in JPEG). I've not really noticed the perf gains from the plugin end that you mention. UDS does do some weird things at times, but the plugin is happily pre-loading pages /almost/ as fast as someone can trigger a page flip with these larger files. And with the pre-loaded pages, the loading times of the larger files are pretty much hidden entirely if you are actually reading the comic. Pixel size could also be coming into play, but all my stuff is in the 1200 to 1600px range for the longest side. PNGs are actually slower to load than JPEGs when they get big (over 1MB). That is where I notice most of the lag. |
|
03-19-2010, 04:56 PM | #14 | |
Fanatic
Posts: 556
Karma: 1102020
Join Date: Sep 2009
Device: Kindle Keyboard (rip), Kindle Voyage, Fire Tablet 10 '17, iPad '19
|
Quote:
|
|
03-19-2010, 05:11 PM | #15 |
本の虫
Posts: 242
Karma: 344
Join Date: May 2008
Location: USA
Device: Kindle3, DXG, Fire · iPad, iPod
|
This is pretty nice, brookman. Thanks.
Request, if it's feasible: configurable dpi setting. It currently outputs at 120 dpi and I prefer 160, which is what the DR800's screen is at. Also, the OFF setting for dpi as well (that is, leave it unchanged from the original) in the cases where I want to use this as a pre-processor then fine tune the images in an IrfanView batch operation. Last edited by Dellaster; 03-19-2010 at 05:13 PM. |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DR800 iRex DR800 PDF Testing | GT4NE1 | iRex | 6 | 07-05-2010 11:04 AM |
What is size of IREX DR800 and DR1000 | PocketGoods | iRex | 12 | 06-05-2010 04:58 AM |
My Take on iPhone, iRex DR800, and the iPad | nikkie | Which one should I buy? | 4 | 05-10-2010 06:04 AM |
IREX DR800 or DR1000? | sordie | Which one should I buy? | 8 | 03-21-2010 08:10 PM |