spectro/dispwin
Summary
This utility has a couple of different functions. When given as a file
argument an ICC profile containing vcgt "gamma" curves, or an Argyll
video calibration .cal file, it will load that calibration into the
chosen display. By default it displays a test window the same as that
used by dispcal and dispread, to test this functionality. It can also
be used to test the ability to load video card LUT curves to each
display, and to test how the console Bell will sound when used with
some instruments (ie. Eye-One Pro).
Usage
dispwin [options]
[calfile]
-v
Verbose mode
-display displayname [X11 only] Choose X11 display name
-d n[,m]
[X11
only] Choose the display from the following list (default 1),
and optionally choose a different display m for Video LUT access.
-d
n
[Not X11] Choose the display from the following list (default 1)
-p ho,vo,ss
Position test window and scale it
ho,vi: 0.0 = left/top, 0.5 = center, 1.0 = right/bottom etc.
ss: 0.5 = half, 1.0 = normal, 2.0 = double etc.
-B
Fill whole screen with black background
-i
Run forever with random values
-m
Manually step through colors
-r
Test just video LUT loading
-n
Test native display values (rather than through Video LUT)
-c
Load a linear display calibration (clear calibration)
-x
Don't exit after loading a calibration.
-V
Verify that calfile is currently loaded
-S
[X11
only] Set X11 ICC_PROFILE atom to profile
-L
[X11
only] Load X11 ICC_PROFILE property profile
into LUT
calfile
Load display calibration (.cal or .icm)
into LUT, and exit.
Comments
The -v flag makes the program more verbose..
When running on a UNIX based system that used the
X11
Windowing
System, dispwin will by default use the $DISPLAY environment
variable to determine which display and screen to read from. This can
be overridden by supplying an X11 display name to the -display option. Note that if
Xinerama is active, you can't select the screen using $DISPLAY or
-display, you have to select it using the -d parameter.
By default the location of
the test window will be the main display. If the system has more than
one display or screen, an alternate display/screen can be selected with
the -d parameter. If you
invoke dispwin
so as to display the usage
information (i.e. "dispcal -?" or "dispcal --"), then the discovered
displays/screens will be listed. Multiple displays may not be listed
if they appear as a single display to the operating system (ie. the
multi-display support is hidden in the video card driver). On UNIX
based system that used the X11
Windowing
System, the -d parameter will
override the screen specified by the $DISPLAY or -display parameter.
Note that if the VideoLUTs for a display are not
accessible, dispwin
will fail when it attempts to access them. This could be because you
are trying to access
a remote display, and the remote display doesn't support the
XF86VidMode extension, or perhaps you are running multiple monitors
using NVidia TwinView, or MergedFB, and trying to access anything other
than the primary monitor. TwinView and MergedFB don't properly support
the XF86VidMode extension for multiple displays. Xinerama does properly
support calibration of multiple displays. See also below, on how to
select a different display for VideoLUT access. Also note that dispwin
will fail if the Visual depth doesn't match the
VideoLUT depth. Typically the VideoLUTs have 256 entries per color
component, so the Visual generally needs to be 24 bits, 8 bits per
color component.
Because of the difficulty cause by TwinView and
MergedFB in X11 based systems, you can optionally specify a separate
display number after the display that is going to be used to present
test patches, for accessing the VideoLUT hardware. This must be
specified as a single string, e.g. -d
1,2 . Some experimentation may be needed on such systems, to
discover what screen has access to the VideoLUT hardware, and which
screens the test patches appear on. You may be able to calibrate one
screen, and then share the calibration with another screen. Profiling
can be done independently to calibration.
The -p
parameter allows you to position and size the test patch window. By
default it is places in the center of the screen, and sized
appropriately for the type of instrument. The ho and vo values govern the horizontal and
vertical offset respectively. A value of 0.0 positions the window to
the far left or top of the screen, a value of 0.5 positions it in the
center of the screen (the default), and 1.0 positions it to the far
right or bottom of the screen. The ss
parameter is a scale factor for the test window size. A value of 0.5
for instance, would produce a half sized window. A value of 2.0 will
produce a double size window. Note that the ho,vo,ss numbers must be
specified as a single string (no space between the numbers and the
comma).
For example, to create a double sized test window at the top right of
the screen, use -p 1,0,2 .
The -B
flag causes the while screen behind the test window to be masked with
black. This can aid black accuracy when measuring CRT displays or
projectors.
By default dispwin will put a
test window on the selected display, and display some test colors,
before darkening then brightening the screen by loading video LUT
values, test the bell sounds, then restore the original values and exit.
If the -i
flag is set, then dispwin will
display the preset sequence, then random test colors forever.
If the -m
flag is set, then dispwin will
display the preset sequence then exits, but
advances manually after each return key.
If the -r
flag is set, then dispwin will
test just the loading of video LUT values by first darkening, then
lightening the screen, before exiting.
If the -n
flag is set, then dispwin will
display the colors directly on the display, rather than having the
color values translated through the currently loaded Video LUTs.
If a -c flag
is used, then rather than displaying a test window, dispwin will load the selected
display with a linear set of Video LUT curves, effectively clearing
the calibration, and will then exit. Any calfile
will be ignored.
If a -x flag
is used, then after clearing (-c flag) or loading a calibration from a
.cal or ICC profile, dispwin will continue running forever, rather than
exiting. This is useful on Apple OS X, which reverts the video LUT
contents when an application like dispwin exits. The only way on OS X
to permanently load a calibration is to incorporate it in an ICC
profile, and make it the profile for the display in System-Preferences->Displays.
If a -V flag
is used, then rather than loading the calibration specified as the
final argument, the currently loaded calibration will be verified as
being the same as the given calibration file.
When running
on a UNIX X11
Windowing
System, if an -S flag
is used then the ICC profile specified as the
final argument will be installed into the appropriate X11 _ICC_PROFILE
property in the root window. This follows this convention
for allowing applications to locate the display profile for a
particular X11 display. Calibration in the profile is not loaded
onto the display.
When running
on a UNIX X11
Windowing
System, if an -L flag
is used then the display video LUT is set from the vcgt tag in the profile stored in
the appropriate X11 _ICC_PROFILE property in the root window. This
follows this convention
for allowing applications to locate the display profile for a
particular X11 display. The -L
flag can be used with the -V
flag to verify that the current calibration is that from the
_ICC_PROFILE property.
The final optional parameter on the command line is
the name of an ICC profile that contains a Video LUT vcgt tag, or an Argyll .cal
format display calibration. If this parameter is provided, then the
selected display will be loaded with the given calibration. If the -V flag was given, then it is
verified that this calibration is the currently loaded one. This
is
useful in initializing a system to the current calibration on system
startup. Note that the vcgt tag interpretation within Argyll is
consistent with that of the originators of the tag. Other ICC profile
vcgt implementations may not be so consistent.