Coder Social home page Coder Social logo

wyatt8740 / neudist Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 0.0 100 KB

A small DisplayCAL alternative Bourne shell script. Meant for Unix systems using Argyll CMS.

License: MIT License

Shell 100.00%
displaycal argyllcms argyll icc-profile profile icc color calibration

neudist's Introduction

neudist

Not Entirely Unlike a DISplay Tester.

A helper tool (bourne shell script) for calibrating and profiling displays with Argyll CMS.

Since DisplayCal is no longer in my Linux distro (Debian Sid) on account of Python 2.7 dependencies that got removed, I wrote this helper script to assist me in driving Argyll CMS's tools directly.

I am too dumb to remember all of the steps for directly using Argyll, so I wanted to make a "one-stop-shop" tool that would handle my calibration and color profiling needs on my (Linux-based) machines, either while I wait for DisplayCAL to get ported to Python 3. Maybe even permanently.

I share this in the hopes that it will help others. If you need a feature that Argyll or DisplayCAL exposes which I do not have a way to use, please create an issue or a pull request and I'll get on it as soon as I can.

Similarly, if I made oversights (I am certain that I did), please let me know about them.

Run the script with --help for a full writeup.

If run without any arguments, or run with only one argument (a profile name), the script will try to calibrate and profile a screen with default Argyll dispcal values (which usually means argyll measures and determines for you). It will put the results in a directory with the name provided as an argument.

You may have to provide a path to your colorimeter correction files, or use --no-correction if you have a spectrometer. This path can be provided on the command line, or it can be made the default by editing the script near the top. I might move this to a configuration file later, if this thing gets larger.

I have only used this tool three times so far, so be warned. It shouldn't destroy anything, but I take no responsibility if it does. Don't run it as root, at the very least. Set up udev rules or change permissions for your colorimeter instead.

Tested so far on a PowerBook G4 and also my x86 (amd64) desktop, where it is working pretty much on par with DisplayCAL while using far fewer resources.

Usage

This is just a single example that I have personally used on one of my systems; for a better understanding of why I do what I am doing here, definitely check the --help output and consider trying to read the script sources to see the comments I have strung all throughout it. Also refer to the Argyll CMS documentation if you are still confused; it is in many cases much better written (although more technical in some cases).

./neudist \
    --all \
    --correction /path/to/optional/corrections/file/HB140WX1-300_i1_DisplayPro_Colormunki_Display.ccmx \
    --intent p \
    --intent-sat lp \
    --input-profile /usr/share/color/argyll/ref/sRGB.icm \
    --noninteractive \
    --skip-adjust \
    --whitepoint-preset D65 \
    --gamma s \
    HB140WX1-300-fullbright_2022-09-20

Do note that the corrections file I used above is not the correct one for my panel (in my Thinkpad X201 tablet); I don't have a spectrometer for making that. It is simply a panel that I believe has similar properties, is of the same display technology, and was made by the same company at a similar point in time. It does a pretty good job.

Bugs

  • Yes.

  • Please report bugs as you find them; pull requests are even more appreciated.

  • Not my bug, but older Firefox, Seamonkey, and Pale Moon don't like LAB profiles, it seems. So I have made XYZ cLUT + Matrix the default (--algorithm X). For the Argyll default, do --algorithm l. New firefox (tested on 89) seems to handle it alright.

  • While it works very nicely for doing calibration, profiling, and profile creation in one swoop (probably the most common use case), attempting to skip some steps may not work as nicely as I would like for it to. That's bad mostly because if some stage of calibrating/profiling fails, you have to start over from square one or follow the rest of the script manually.

  • The aforementioned functionality is currently documented so that I might fix it some day, but if you want to do something like creating multiple profiles from a single measurement session you may be better off reading the logs to find out what arguments to pass to the Argyll CMS command line tools directly. I also recommend doing this as a way to gain an insight into how display calibration/profiling actually works.

  • Argyll is an extremely powerful set of programs, and what my program exposes barely scratches the surface of what it can do, even just within the realm of display calibration/profiling.

  • Unfortunately, due to how I chose to implement the script, it may be challenging for me to fully support doing smaller individual steps. There are also plenty of places where documentation could be improved or command line flags could be renamed/added for additional functionality.

  • Some paths are hardcoded. It would be wise to search through the script and see where it is mentioning paths like /usr/ to make sure you have the files it is going to look for on your system. The Argyll CMS package puts most of those files in the right places on Debian and Debian derived systems, but I can't guarantee it works every time.

  • I believe that right now I am implicitly assuming anyone who is calibrating and profiling their screens is targetting SRGB. This is a clearly bad assumption. I just don't have any wide gamut screens and haven't been bugged quite enough about it to fix it. Please bug me if you consider it important, and it will greatly increase the odds that I will try to do something about it!

neudist's People

Contributors

wyatt8740 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

neudist's Issues

LAB profiles

nice work here, on firefox 101 LAB profiles dont seem to apply at all. cLUT + Matrix seem to be the default in Displaycal. I couldnt find the explanation on why LAB is default in colprof.

Skipping calibration/profiling to just make an LUT based on existing files fails

If run in one shot, everything works as intended. But if you try to use an existing calibration and profile to make an LUT, or even just skip calibration and go straight to profiling, the script might not work as intended. There are some deep structural issues at the root of this.

"Workarounds": Either run the whole thing through, or read and figure out what the shell script functions for profiling/LUT creation are doing to manually run them outside of the script.

Both of these "workarounds" are really not workarounds but alternative ways of doing things without my script.

It should be fixable, I just have to sit down and do it. If anyone here wants to use my script for that, let me know here and maybe that'll motivate me to work on it sooner.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.