🍺 BREW Explorer

← all formulae

jbig2enc

brew install jbig2enc v0.32 Apache-2.0

Command-line JBIG2 encoder for compressing monochrome documents and images with symbol extraction and PDF embedding support.

Why you might care

JBIG2 achieves superior compression ratios for 1-bit images and scanned documents compared to G4/CCITT encoding. Use this if you're processing document scans or archiving monochrome images and need better compression than alternatives. It can extract and classify text regions, perform refinement coding, and output either standalone JBIG2 files or PDF-embeddable fragments.

Categories

Alternatives

ImageMagick Ghostscript convert
1.7k
30-day installs · #1057
5.2k
90-day · #1072
10.6k
365-day · #1394
70
★ GitHub stars · updated 1d ago

Runtime dependencies

Build dependencies

Links

Blurb generated by claude-haiku-4-5 on today.

Raw metadata
{
  "aliases": [],
  "alternatives": [
    "ImageMagick",
    "Ghostscript",
    "convert"
  ],
  "build_dependencies": [
    "autoconf",
    "automake",
    "libtool",
    "pkgconf"
  ],
  "categories": [
    "image-tool",
    "compression"
  ],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [
    "leptonica",
    "giflib",
    "jpeg-turbo",
    "libpng",
    "libtiff",
    "webp"
  ],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "JBIG2 encoder (for monochrome documents)",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:38:58+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "jbig2enc",
  "github_default_branch": "master",
  "github_last_commit_at": "2026-06-19T18:14:03Z",
  "github_readme_excerpt": "# JBIG2 Encoder\n\n[![autotools](https://github.com/agl/jbig2enc/actions/workflows/autotools.yaml/badge.svg)](https://github.com/agl/jbig2enc/actions/workflows/autotools.yaml) [![Msys2](https://github.com/agl/jbig2enc/actions/workflows/msys2.yaml/badge.svg)](https://github.com/agl/jbig2enc/actions/workflows/msys2.yaml) [![meson](https://github.com/agl/jbig2enc/actions/workflows/meson.yaml/badge.svg)](https://github.com/agl/jbig2enc/actions/workflows/meson.yaml) [![cmake](https://github.com/agl/jbig2enc/actions/workflows/cmake.yaml/badge.svg)](https://github.com/agl/jbig2enc/actions/workflows/cmake.yaml)\n\nThis is an encoder for [JBIG2](doc/fcd14492.pdf).\n\nJBIG2 encodes bi-level (1 bpp) images using a number of clever tricks to get\nbetter compression than G4. This encoder can:\n\n* Generate JBIG2 files, or fragments for embedding in PDFs\n* Generic region encoding\n* Perform symbol extraction, classification and text region coding\n* Perform refinement coding and,\n* Compress multipage documents\n\nIt uses the (Apache-ish licensed) [Leptonica library](https://github.com/danbloomberg/leptonica). Version 1.74 or later is required.\n\n## Known bugs\n\nThe refinement coding causes Acrobat to crash. It\u0027s not known if this is a bug\nin Acrobat, though it may well be.\n\n## Usage\n\n_Note_: Windows Command Prompt does not support wildcard expansion, so `*.jpg` will not work. You\u0027ll need to manually expand the file names yourself or you need to use the latest git code and [MSVC build](https://learn.microsoft.com/en-us/cpp/c-language/expanding-wildcard-arguments).\n\nSee the `jbig2enc.h` header for the high level API, or the `jbig2` program for an\nexample of usage:\n\n```sh\njbig2 -s -a -p -v -T 100 -b imgs images/*.jpg \u0026\u0026 python jbig2topdf.py imgs \u003eout.pdf\n```\n\nor with standalone mode:\n\n```sh\njbig2 -a -p -v images/feyn.tif \u003e feyn.jb2 \u0026\u0026 python jbig2topdf.py -s feyn.jb2 \u003e feyn.pdf\n```\n\nto encode jbig2 files for pdf creation.\nIf you want to encode an image and then view output first to include in pdf\n",
  "github_repo": "agl/jbig2enc",
  "github_stars": 70,
  "github_topics": [],
  "homepage": "https://github.com/agl/jbig2enc",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 1695,
  "installs_365d": 10609,
  "installs_90d": 5207,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "Apache-2.0",
  "llm_generated_at": "2026-06-20T23:48:43+00:00",
  "llm_model": "claude-haiku-4-5",
  "name": "jbig2enc",
  "oldnames": [],
  "one_liner": "Command-line JBIG2 encoder for compressing monochrome documents and images with symbol extraction and PDF embedding support.",
  "optional_dependencies": [],
  "rank_30d": 1057,
  "rank_365d": 1394,
  "rank_90d": 1072,
  "raw_hash": "ac569759d1d09fde",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/j/jbig2enc.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [],
  "version_head": "HEAD",
  "version_stable": "0.32",
  "versioned_formulae": [],
  "why_use_this": "JBIG2 achieves superior compression ratios for 1-bit images and scanned documents compared to G4/CCITT encoding. Use this if you\u0027re processing document scans or archiving monochrome images and need better compression than alternatives. It can extract and classify text regions, perform refinement coding, and output either standalone JBIG2 files or PDF-embeddable fragments."
}