A rather simple demo python program to preview raw12 files. You can switch between monochrome and color mode. Output is not meant to replace a proper raw development workflow but is meant as a quick and easy way to see what a raw12 file contains.
sudo apt install python3, python3-pip, python3-tk pip3 install PySimpleGUI
python3 raw12viewer.py image.raw12
4 Filetype Association
To open the viewer automatically when double clicking on raw12 files the filetype needs to be associated.
Here is a guide how to do that on Ubuntu/Debian Linux based distros:
Create/edit a .desktop file located in ~/.local/share/applications/ or /usr/share/applications/
In our case we called it raw12viewer.desktop and the content is (make sure the Exec path points to your local location of the script):
[Desktop Entry] Version=1.0 Type=Application Terminal=false Name=raw12 Viewer Exec=python3 /home/user/Documents/GitHub/misc-tools-utilities/raw12-viewer.py %F Hidden=false