Skip to content
p5k369Public

About

Fujifilm raw converter: develop RAFs through the camera's own engine

Topics

Resources

Contributing

Stars

40 stars

Watchers

1 watching

Forks

Repository files navigation

grawji

Python 3.11+ License: GPL-3.0-or-later codecov

GTK4 frontend for rawji. Develop Fujifilm RAFs natively on Linux through the real camera engine (authentic film simulations, identical to X RAW STUDIO).

The name is g(ui) + rawji (/dʒiː ˈrɔː dʒiː/).

grawji main window: original + EXIF on the
  left, live preview in the centre, recipe controls on the right, filmstrip
  along the bottom

Features

  • Live preview through the camera's own conversion engine, with split compare, histogram and clipping zebras.
  • Recipes: a library with hotkeys, imported from photos, edited exports, X RAW STUDIO files or community text.
  • Crop, straighten and perspective, kept per image.
  • Browse and cull: grid, stars, labels, filters and file operations.
  • Export single images or batches as JPEG, HEIF, TIFF or JPEG XL.
  • Experimental: write recipes into the camera's custom banks.

All features: docs/features.md.

Warranty disclaimer

Fujifilm's official Camera Control SDK page states, verbatim:

USING THIS SDK TO CONNECT TO OR CONTROL, ANY COMPATIBLE FUJIFILM CAMERA WILL VOID THE CAMERA'S LIMITED PRODUCT WARRANTY.

grawji and rawji do not use that SDK, but they talk to the camera over the same USB protocol and are not licensed by Fujifilm. Reporting based on statements from Fujifilm says the policy extends to any non-licensed program connecting to the camera, and that the camera records a marker each time one connects. Consumer-protection law in your country may limit or override such terms, but do not count on it: use grawji at your own risk.

Install

First, put the camera in RAW-conversion USB mode, otherwise rawji cannot talk to it:

Set Up → Connection Setting → USB Mode → USB RAW CONV./BACKUP RESTORE

How Install Notes
Debian / Ubuntu sudo apt install ./grawji_*_all.deb package from Releases, pulls GTK4 and ships the USB rule
Flatpak flatpak install --user grawji.flatpak bundle from Releases, everything included
Gentoo emerge media-gfx/grawji in GURU, ~amd64, pulls dev-python/rawji
Nix nix run github:p5k369/grawji flake, no clone needed. nix build gives ./result/bin/grawji
Source make install system GTK4 and PyGObject first, see below

JPEG XL and HEIF export need cjxl and libheif with its HEVC plugins. The Flatpak carries them, the Debian package recommends them, everywhere else they are your distribution's packages. Without them those formats are simply not offered.

USB access: the Debian package installs a udev rule, and most distributions grant non-root access anyway through uaccess or plugdev. If yours does not, add a rule for the Fuji vendor id 0x04cb.

From source, step-by-step

GTK4 and PyGObject come from your distribution, not pip: install the system packages, then make install.

1. System packages (GTK4, libadwaita, PyGObject, the GExiv2 EXIF reader, and the USB stack). Names vary by distro:

Distro Install
Debian / Ubuntu apt install git make python3-gi gir1.2-gtk-4.0 gir1.2-adw-1 gir1.2-gexiv2-0.10 libgtk-4-1 libusb-1.0-0
Fedora dnf install git make python3-gobject gtk4 libadwaita gexiv2 libusb1
Arch pacman -S git make python-gobject gtk4 libadwaita gexiv2 libusb
openSUSE zypper install git make python3-gobject gtk4 libadwaita-1-0 typelib-1_0-GExiv2-0_10 libusb-1_0-0
Gentoo emerge dev-vcs/git sys-devel/make dev-python/pygobject gui-libs/gtk:4 gui-libs/libadwaita media-libs/gexiv2 dev-python/pyusb virtual/libusb

2. Clone and install (make install builds a venv with --system-site-packages so it can import the system GTK, fetches rawji from git, installs grawji):

git clone https://github.com/p5k369/grawji
cd grawji
make install
make run        # or: .venv/bin/python -m grawji

Credits

grawji stands entirely on rawji by pinpox, who did the hard work of talking to the camera's conversion engine over USB and exposing it as a clean Python library. grawji is just a GTK4 face on top of that. Thank you. And if you find grawji useful, please go star rawji.

The profile format was reverse-engineered by petabyt, whose fp and libfuji are the authoritative reference for the camera's d185 conversion profile. grawji's parameter encodings (e.g. noise reduction, processor capabilities) were verified against that work.

Third-party code inside grawji

grawji's automatic perspective correction is not grawji's work. It is a line-by-line Python port.

What Where in grawji Ported from License
Automatic perspective correction src/grawji/keystone.py darktable, src/iop/ashift.c, originally written by Ulrich Pegelow GPL-3.0-or-later
Nelder-Mead optimizer src/grawji/keystone.py Michael F. Hutt, by way of darktable's src/iop/ashift_nmsimplex.c MIT

The method, the line weighting, the vanishing-point search and the crop fitting are all darktable's. grawji only translates them into Python and feeds them line segments from lsdetect. If that feature is useful to you, the people to thank are the darktable developers.

The Nelder-Mead optimizer is third-party code within darktable as well. It is by Michael F. Hutt, copyright (c) 1997-2011, under the MIT license. The site his notice points to no longer resolves, his own copy lives at huttmf/nelder-mead.

License

GPL-3.0-or-later.

About

Fujifilm raw converter: develop RAFs through the camera's own engine

Topics

Resources

Contributing

Stars

40 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages