Comic Book CBx-To-CBx Convert & Resize v1.50

This isn't working at all.

Could you be more explicit ?

Added a short showcase video to the head post on how it looks like in real life. :slight_smile:

Hi, this is nearly perfect for the use case that i'm looking for, i also got a ton of zip files which i would like to repack into cbz. My problem right now is that i know some of these got mangeld and are old .rar.

What i would really like to know is if it would be hard to chage the code to also repack .zip instead of just cbz etc. I'm playing around with the vbs code but to be honest i have no idear what i'm doing here.

Or does somebody know of something that will do what i need?

The easiest thing to do is to select all .zip and change them to .cbz before running the script.

  1. Use flat view if you have them all over the subfolders
  2. Filter for .zip files
  3. Rename - change the extension from .zip to .cbz
  4. Run the script
1 Like

There is a tool call Jpeg Archive, that will recompress a jpeg optimising the compression without reducing the quality. In my experience you can expect a 30% reduction is file size.

The page below can explains how it does this, but the short version is. Jpeg is compressed in blocks using a constant compression rate to each block. This tool (when using the smallfry flag) recompresses each bock separately, increasing the compression rate until it starts to see noise.
The result is the file looks the same but its smaller.

I don't use comics but I found a sample CBZ online that was 11.7MB. When I enabled the smallfry compression the output zip went from 9.39MB (after resize) to 6.84MB (after resize and smallfry).

CBx to CBx 1.5.1 .dcf (35.9 KB)

You will need to download jpeg-recompress.exe from here

Updated UI
note this was a quick update to see if this was worth trying. Let me know if you have issues or feedback.

1 Like

I have made some updates to suit my use-case which is perhaps not 100% inline with with the original use-case but I believe it should still add value.

For our personal photo library we group images by event (xmas 2018, persons 3rd bday....). Then zip each set. I wanted to go through all of the photos and recompress them to using jpeg-recompress.exe and overwrite the original archive set. I never resize the image, I only recompress it.

Its still a WIP, back up your original image sets first :).

Changes made.

  • For each temp extracted set move all images to single folder. Instead of finding the child folder with the images.
  • Only overwrite original archive if file count matches.
  • Copy some Metadata from original archive to new archive
  • Add compressed tag so I know what has been completed (also skip tagged sets).
  • Added a overall progress dialog that supports Aborting.
  • Added option to hide dialogs for individual steps, including hiding the re-compress dos window.
  • Allow .zip files to be processed
  • Added some logging with levels
  • Restructured code to have more functions.

CBx to CBx 1.5.2 .dcf (57.2 KB)

Hello all,

Thank you for this wonderful tool. I'm trying to use the button but I'm getting a script error:
Error at line 394, position 2
Variable is undefined: 'sRMode' (0x800a01f4)

Anyone know what this means or how to fix it? I don't know much about scripting.



Try this:

CBx to CBx 1.5.2-fixed.dcf (57.2 KB)

1 Like


Thanks for your help! I tried it and got a different error now:

Error at line 402, position 3
Variable is undefined: 'nHeight' (0x800a01f4)

Try this:

CBx to CBx 1.5.2-fixed.dcf (57.2 KB)

1 Like

You're fast! Thank you so much, that worked and the tool did an awesome job! :smiley:

You guys rock!

1 Like

One more question... is there a part of the script or the UI where I can set the default resize option to the ipad air 1536 x 2048, as opposed to the android table that it defaults to?

Thanks again

I think if you edit this highlighted line: can change the 1 at the end of the line to the number of option/line you want to be selected initially in the list of resolutions when the dialog opens.


Ha! you were right! I had previously tried changing the two lines that followed it and when that didn't work, I just asked here.

Thanks again!


No problem. I think those lines change the values in the edit controls to the right of the list, which are probably only used when the "custom" option at the bottom of the list is selected. (I only had a quick look at the script, so this may be wrong.)

It's been awhile since I made this, but I think if you set this value to 20 it should stick. No additional setting needs to be set. I remember that I was playing around with global configuration settings, but can't remember what has happened with that in the end. :slight_smile:

Forgot to reply that yes, 20 was the one I needed. Thank you all for your help, this button/scripts works wonderfully, I've saved a ton of space and they still look great. Props!

so anyone have anyway in this script to set the default to not resize just convert? I tried adding the line

dlgO.Control('chkDoNotResize').Value = 1

after the resize settings block. The button will run but it doesn't recompress the file. Without that line and clicking things manually it works fine.

I haven't tested it, but changing/adding the last two lines here might do it:

'Set defaults
'Resolution: 800×1280
 dlgO.Control("lstResolution").Value = 1
 lngNewHeight = 1280
 lngNewWidth  = 800
 strResizeMode = "Do Not Resize" ' CHANGED -- Was "Auto"
 dlgO.Control("chkDoNotResize").Value = 1 ' ADDED