CBconvert is a Comic Book converter
GPL-3.0 License
CBconvert is a Comic Book converter.
It can convert comics to different formats to fit your various devices.
See more screenshots.
Copy cbconvert
cli binary to your PATH and create file ~/.local/share/thumbnailers/cbconvert.thumbnailer
:
[Thumbnailer Entry]
TryExec=cbconvert
Exec=cbconvert thumbnail --quiet --width %s --outfile %o %i
MimeType=application/pdf;application/x-cb7;application/x-cbt;application/epub+zip;application/vnd.comicbook-rar;application/vnd.comicbook+zip;application/x-mobipocket-ebook;application/vnd.ms-xpsdocument;
This is what it looks like in the PCManFM file manager:
Usage: cbconvert <command> [<flags>] [file1 dir1 ... fileOrDirN]
Commands:
convert
Convert archive or document
--width
Image width (default "0")
--height
Image height (default "0")
--fit
Best fit for required width and height (default "false")
--format
Image format, valid values are jpeg, png, tiff, bmp, webp, avif, jxl (default "jpeg")
--archive
Archive format, valid values are zip, tar (default "zip")
--quality
Image quality (default "75")
--filter
0=NearestNeighbor, 1=Box, 2=Linear, 3=MitchellNetravali, 4=CatmullRom, 6=Gaussian, 7=Lanczos (default "2")
--no-cover
Do not convert the cover image (default "false")
--no-rgb
Do not convert images that have RGB colorspace (default "false")
--no-nonimage
Remove non-image files from the archive (default "false")
--no-convert
Do not transform or convert images (default "false")
--grayscale
Convert images to grayscale (monochromatic) (default "false")
--rotate
Rotate images, valid values are 0, 90, 180, 270 (default "0")
--brightness
Adjust the brightness of the images, must be in the range (-100, 100) (default "0")
--contrast
Adjust the contrast of the images, must be in the range (-100, 100) (default "0")
--suffix
Add suffix to file basename (default "")
--levels-inmin
Shadow input value (default "0")
--levels-gamma
Midpoint/Gamma (default "1")
--levels-inmax
Highlight input value (default "255")
--levels-outmin
Shadow output value (default "0")
--levels-outmax
Highlight output value (default "255")
--outdir
Output directory (default ".")
--size
Process only files larger than size (in MB) (default "0")
--recursive
Process subdirectories recursively (default "false")
--quiet
Hide console output (default "false")
cover
Extract cover
--width
Image width (default "0")
--height
Image height (default "0")
--fit
Best fit for required width and height (default "false")
--format
Image format, valid values are jpeg, png, tiff, bmp, webp, avif, jxl (default "jpeg")
--quality
Image quality (default "75")
--filter
0=NearestNeighbor, 1=Box, 2=Linear, 3=MitchellNetravali, 4=CatmullRom, 6=Gaussian, 7=Lanczos (default "2")
--outdir
Output directory (default ".")
--size
Process only files larger than size (in MB) (default "0")
--recursive
Process subdirectories recursively (default "false")
--quiet
Hide console output (default "false")
thumbnail
Extract cover thumbnail (freedesktop spec.)
--width
Image width (default "0")
--height
Image height (default "0")
--fit
Best fit for required width and height (default "false")
--filter
0=NearestNeighbor, 1=Box, 2=Linear, 3=MitchellNetravali, 4=CatmullRom, 6=Gaussian, 7=Lanczos (default "2")
--outdir
Output directory (default ".")
--outfile
Output file (default "")
--size
Process only files larger than size (in MB) (default "0")
--recursive
Process subdirectories recursively (default "false")
--quiet
Hide console output (default "false")
meta
CBZ metadata
--cover
Print cover name (default "false")
--comment
Print zip comment (default "false")
--comment-body
Set zip comment (default "")
--file-add
Add file to archive (default "")
--file-remove
Remove file(s) from archive (glob pattern, i.e. *.xml) (default "")
cbconvert --recursive --width 1200 --size 60 /media/comics/Thorgal/
cbconvert --format bmp --outdir ~/comics /media/comics/Garfield/Garfield_01.pdf
BMP format is a very good choice for black&white pages. Archive size can be smaller 2-3x and the file will be readable by comic readers.
cbconvert cover --outdir ~/covers --filter=7 /media/comics/GrooTheWanderer/
cbconvert --format avif --quality 50 --width 1280 --outdir ~/comics /media/comics/Misc/
This table maps quality settings for JPEG to the respective AVIF and WEBP quality settings:
JPEG quality | 50 | 60 | 70 | 80 |
AVIF quality | 48 | 51 | 56 | 64 |
WEBP quality | 55 | 64 | 72 | 82 |
Install ImageMagick7 (with libheif/libjxl support) and MuPDF libraries and headers and then install to GOBIN:
go install -tags extlib github.com/gen2brain/cbconvert/cmd/cbconvert@latest
For GUI app, check IUP requirements, and then install:
go install -tags extlib github.com/gen2brain/cbconvert/cmd/cbconvert-gui@latest