Skip to main content

KB Image Workflow Tool

Project description

KB Image Workflow Tool

About this software

Kbiw converts image files in digitisation batches to JP2 (JPEG 2000 Part 1) format using the Grok codec. It clones the structure of the input directory, and then replicates it in the output directory. The JP2 images are then subjected to the following quality checks:

  1. Pixel comparison between each pair of source and destination images (using libvips and pyvips).
  2. Check of extracted technical properties (using jpylyzer) against a user-defined Schematron profile.

The software also generates checksums of all converted images.

Dependencies

Installation of dependencies

Grok (all platforms)

  1. Download the latest binaries of the Grok image compression software for your platform from:

    https://github.com/GrokImageCompression/grok/releases

  2. Extract the ZIP file to your local file system, and make a note of the installation location. You'll need to enter this later in the kbiw configuration file.

Libvips

Linux (Ubuntu, Linux Mint)

Install libvips using:

sudo apt install libvips-dev --no-install-recommends

macOS

TODO

Windows

  1. Download the latest release from the build-win64-mxe repository. For a 64 bit Windows system you need the ZIP file that follows the "vips-dev-x64-all-x.y.z.zip" naming pattern (e.g. vips-dev-x64-all-8.18.2.zip).

  2. Extract the ZIP file to your local file system, and make a note of the installation location (e.g. "C:\vips-dev"). You'll need to enter this later in the kbiw configuration file.

ExifTool

Linux (Ubuntu, Linux Mint)

Install ExifTool using:

sudo apt install libimage-exiftool-perl

macOS

TODO

Windows

  1. Download the 64-bit Windows executable from the ExifTool website.

  2. Extract the ZIP file to your local file system.

  3. In the extracted folder, rename the ExifTool executable ("exiftool(-k).exe") to "exiftool.exe.

  4. Make a note of the full path to the executable (e.g. "C:\exiftool\exiftool.exe"). You'll need to enter this later in the kbiw configuration file.

Installation of kbiw

As of 2026, uv appears to be the most straightforward tool for installing Python applications on a variety of platforms (Linux, MacOS, Windows).

uv installation

First, check if uv is installed on your system by typing the uv command in a terminal:

uv

If this results in a help message, uv is installed, and you can skip directly to the "imgquad installation" section below. If not, you first need to install uv.

On Linux and MacOS you can install uv with the following command:

curl -LsSf https://astral.sh/uv/install.sh | sh

Alternatively, you can use wget if your system doesn't have curl installed:

wget -qO- https://astral.sh/uv/install.sh | sh

To install uv on Windows, open a Powershell terminal, and run the following command:

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Regardless of the operating system, in some cases the installation script will update your system's configuration to make the location of the uv executable globally accessible. If this happens, just close your current terminal, and open a new one for these changes to take effect. Pay attention to the screen output of the installation script for any details on this.

kbiw installation

Use the following command to install kbiw (all platforms):

uv tool install kbiw

Then run kbiw once:

kbiw

Depending on your system, kbiw will now create a configuration folder (see next section).

Configuration

Before you can use kbiw, you need to edit the configuration file, which is located in the configuration folder. The configuration folder has the name "kbiw", and its location depends on your operating system:

  • For Linux and MacOS, the configuration folder is a subdirectory of the location defined by the environment variable $XDG_CONFIG_HOME. If this variable is not set, it will be a subdirectory of the .config directory in the user's home folder (e.g. /home/johan/.config/kbiw). Note that the .config directory is hidden by default.
  • For Windows, the configuration folder is a subdirectory of of the AppData\Local folder (e.g. C:\Users\johan\AppData\Local\kbiw).

Open the configuration file ("config.json") in a text editor, and edit the following values:

Variable Meaning Examples
grokDir Grok installation directory C:/Grok (Windows); ~/grok (Linux)
exifToolExecutable ExifTool executable C:/exiftool/exiftool.exe (Windows); /bin/exiftool (Linux)
vipsBinDir Libvips binary dir (only needed on Windows, ignored on Linux/macOS) C:/vips-dev/bin (Windows)

Here's an example for a Windows system:

{
  "grokDir": "`C:/Grok",
  "exifToolExecutable": "C:/exiftool/exiftool.exe",
  "vipsBinDir": "C:/vips-dev/bin",
  :
}

upgrade kbiw

Use the following command to upgrade an existing kbiw installation to the latest version:

uv tool upgrade kbiw

Licensing

KBiw is released under the Apache License, Version 2.0. Parts of the code were inspired by the Bodeleian's Image Processing library.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kbiw-0.1.1.tar.gz (28.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kbiw-0.1.1-py3-none-any.whl (30.5 kB view details)

Uploaded Python 3

File details

Details for the file kbiw-0.1.1.tar.gz.

File metadata

  • Download URL: kbiw-0.1.1.tar.gz
  • Upload date:
  • Size: 28.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for kbiw-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3dfdf8541cc2261c505c53fbcf6a9bcd10b93c8bb4be937e0278d510fea068cf
MD5 c6261f472f56433d4d88bc6c5c0744a8
BLAKE2b-256 ee1fab456b70a939cc15055b41d69011cc522f532f676a587374636f7e38e341

See more details on using hashes here.

File details

Details for the file kbiw-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: kbiw-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 30.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for kbiw-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 45912065a25d4267e1a1212836ff3c6843a8e3abdd6a106bfb22c684546c5fcb
MD5 aab1a0654ec1908c590f4e0e6e10e67d
BLAKE2b-256 814f039e60a98a6c3825a573e94c77b5dea8d77057adb84b5deb75b56cd1e009

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page