snibgo's ImageMagick pages

Dcraw, gamma and eqLimit

What are the best dcraw gamma and auto-brighten settings for various purposes?

dcraw reads a raw camera file and creates a tiff output. It has a variety of settings. This page considers two: "-g" for gamma, and "-W" which turns off auto-brighten. What are the best settings for two purposes:

  1. To quickly get a usable image?
  2. To get the best possible data for future processing?

For "future processing", the example used in this page is eqLimit.bat. This is a process that makes good first-pass images, and is also representative of manual intervention that may be desired.

Image processing is performed on full-size images. Results are heavily reduced for illustration on the web page.

Generate results

The script gameql.bat creates a variety of results: different "-g" settings to dcraw, with or without "-W", before and after eqLimit.bat.

Note that dcraw auto-brightens by default. To turn it off, use -W.

set SRC=\pictures\20130713\AGA_1372.NEF

call %PICTBAT%gameql %SRC%

Results from dcraw

I include the results for -g 1 4.5, though it seems identical to -g 1 0. This is logical; when there is no gamma-shift, a toe-slope is meaningless.

-g setting No auto-brighten Auto-brighten
1 0 ge_AGA_1372_g1_0_nab_sm.jpg ge_AGA_1372_g1_0_nab_hist.png ge_AGA_1372_g1_0_ab_sm.jpg ge_AGA_1372_g1_0_ab_hist.png
1 4.5 ge_AGA_1372_g1_4-5_nab_sm.jpg ge_AGA_1372_g1_4-5_nab_hist.png ge_AGA_1372_g1_4-5_ab_sm.jpg ge_AGA_1372_g1_4-5_ab_hist.png
2.2222 0 ge_AGA_1372_g2-2222_0_nab_sm.jpg ge_AGA_1372_g2-2222_0_nab_hist.png ge_AGA_1372_g2-2222_0_ab_sm.jpg ge_AGA_1372_g2-2222_0_ab_hist.png
2.2222 4.5 ge_AGA_1372_g2-2222_4-5_nab_sm.jpg ge_AGA_1372_g2-2222_4-5_nab_hist.png ge_AGA_1372_g2-2222_4-5_ab_sm.jpg ge_AGA_1372_g2-2222_4-5_ab_hist.png
2.2222 12.92 ge_AGA_1372_g2-2222_12-92_nab_sm.jpg ge_AGA_1372_g2-2222_12-92_nab_hist.png ge_AGA_1372_g2-2222_12-92_ab_sm.jpg ge_AGA_1372_g2-2222_12-92_ab_hist.png
no -g setting ge_AGA_1372_gnull_nab_sm.jpg ge_AGA_1372_gnull_nab_hist.png ge_AGA_1372_gnull_ab_sm.jpg ge_AGA_1372_gnull_ab_hist.png
gamMaxSd
2.96917228 0
ge_AGA_1372_g2-96917228_0_nab_sm.jpg ge_AGA_1372_g2-96917228_0_nab_hist.png ge_AGA_1372_g2-96917228_0_ab_sm.jpg ge_AGA_1372_g2-96917228_0_ab_hist.png
4 0 ge_AGA_1372_g4_0_nab_sm.jpg ge_AGA_1372_g4_0_nab_hist.png ge_AGA_1372_g4_0_ab_sm.jpg ge_AGA_1372_g4_0_ab_hist.png

The quantitative data below shows that all the results span the full range from 0.0 to 1.0.

If the purpose is to get an image that is immediately usable, the "auto-brighten" image is superior, whatever the gamma setting. However, auto-brighten has clipped highlights in all cases, and none of the -H settings cure this.

Of the no auto-brighten results, I prefer the one with gamMaxSd.

Of the auto-brighten results, I prefer the ones with the 2.2 gamma.

Results after processing with eqLimit

The images created by dcraw are then processed with eqLimit.bat:

-g setting No auto-brighten Auto-brighten
1 0 ge_AGA_1372_g1_0_nab_eql_sm.jpg ge_AGA_1372_g1_0_nab_eql_hist.png ge_AGA_1372_g1_0_ab_eql_sm.jpg ge_AGA_1372_g1_0_ab_eql_hist.png
1 4.5 ge_AGA_1372_g1_4-5_nab_eql_sm.jpg ge_AGA_1372_g1_4-5_nab_eql_hist.png ge_AGA_1372_g1_4-5_ab_eql_sm.jpg ge_AGA_1372_g1_4-5_ab_eql_hist.png
2.2222 0 ge_AGA_1372_g2-2222_0_nab_eql_sm.jpg ge_AGA_1372_g2-2222_0_nab_eql_hist.png ge_AGA_1372_g2-2222_0_ab_eql_sm.jpg ge_AGA_1372_g2-2222_0_ab_eql_hist.png
2.2222 4.5 ge_AGA_1372_g2-2222_4-5_nab_eql_sm.jpg ge_AGA_1372_g2-2222_4-5_nab_eql_hist.png ge_AGA_1372_g2-2222_4-5_ab_eql_sm.jpg ge_AGA_1372_g2-2222_4-5_ab_eql_hist.png
2.2222 12.92 ge_AGA_1372_g2-2222_12-92_nab_eql_sm.jpg ge_AGA_1372_g2-2222_12-92_nab_eql_hist.png ge_AGA_1372_g2-2222_12-92_ab_eql_sm.jpg ge_AGA_1372_g2-2222_12-92_ab_eql_hist.png
no -g setting ge_AGA_1372_gnull_nab_eql_sm.jpg ge_AGA_1372_gnull_nab_eql_hist.png ge_AGA_1372_gnull_ab_eql_sm.jpg ge_AGA_1372_gnull_ab_eql_hist.png
gamMaxSd
2.96917228 0
ge_AGA_1372_g2-96917228_0_nab_eql_sm.jpg ge_AGA_1372_g2-96917228_0_nab_eql_hist.png ge_AGA_1372_g2-96917228_0_ab_eql_sm.jpg ge_AGA_1372_g2-96917228_0_ab_eql_hist.png
4 0 ge_AGA_1372_g4_0_nab_eql_sm.jpg ge_AGA_1372_g4_0_nab_eql_hist.png ge_AGA_1372_g4_0_ab_eql_sm.jpg ge_AGA_1372_g4_0_ab_eql_hist.png

Auto-brighten followed by eqLimit creates very high contrast and saturation.

With no auto-brighten, the results are mostly acceptable visually. When the -g gamma increases, the results become darker, and shadows clip at gamMaxSd and 4. Visually, the best result is from -g 1 0.

Quantitative data

Any processing that moves values up or down the scale, in integer arithmethic, will lose data. Some values that were different before the operation will become equal after the operation. Once they have become equal, they cannot be separated.

One measure of this is hist_entries in the following listing. It makes a histogram of 65536 buckets, incrementing the count of the buckets corresponding to the R, G and B values. The number shown is the proportion of buckets with at least one entry. The higher this number is, the better.

Examining this data, we discover that:

The data loss is not entirely cumulative. After eqLimit.bat, hist_entries varies from 0.204941 to 0.223282 (no auto-brighten) or 0.174423 to 0.176865 (with auto-brighten). Thus, when eqLimit.bat is used, auto-brighten has a large impact on data loss, but gamma has far less impact.

 ge_AGA_1372_gnull_nab.tiff
MIN=0  MAX=1  MEAN=0.17747  SD=0.079771
SatMin=0  SatMax=0.417807  SatMean=0.0406853  SatSD=0.0186661
hist_entries=0.518693

Result of eqLimit.bat: 
MIN=0  MAX=1  MEAN=0.46548  SD=0.217777
SatMin=0  SatMax=0.961059  SatMean=0.13725  SatSD=0.0699306
hist_entries=0.205048



ge_AGA_1372_g1_0_nab.tiff
MIN=0  MAX=1  MEAN=0.0520723  SD=0.0400655
SatMin=0  SatMax=0.44445  SatMean=0.0163201  SatSD=0.0115026
hist_entries=0.565476

Result of eqLimit.bat: 
MIN=0  MAX=1  MEAN=0.506468  SD=0.218151
SatMin=0  SatMax=0.946273  SatMean=0.140335  SatSD=0.069619
hist_entries=0.223282



ge_AGA_1372_g1_4-5_nab.tiff
MIN=0  MAX=1  MEAN=0.0520723  SD=0.0400655
SatMin=0  SatMax=0.44445  SatMean=0.0163201  SatSD=0.0115026
hist_entries=0.565476

Result of eqLimit.bat: 
MIN=0  MAX=1  MEAN=0.506468  SD=0.218151
SatMin=0  SatMax=0.946273  SatMean=0.140335  SatSD=0.069619
hist_entries=0.223282



ge_AGA_1372_g2-2222_0_nab.tiff
MIN=0  MAX=1  MEAN=0.251133  SD=0.0737412
SatMin=0  SatMax=0.47039  SatMean=0.0375593  SatSD=0.0169522
hist_entries=0.497422

Result of eqLimit.bat: 
MIN=0  MAX=1  MEAN=0.423253  SD=0.219097
SatMin=0  SatMax=0.957839  SatMean=0.134981  SatSD=0.0705867
hist_entries=0.212814



ge_AGA_1372_g2-2222_4-5_nab.tiff
MIN=0  MAX=1  MEAN=0.177469  SD=0.0797707
SatMin=0  SatMax=0.417807  SatMean=0.0406851  SatSD=0.0186659
hist_entries=0.518905

Result of eqLimit.bat: 
MIN=0  MAX=1  MEAN=0.465481  SD=0.217778
SatMin=0  SatMax=0.961059  SatMean=0.137251  SatSD=0.0699313
hist_entries=0.204941



ge_AGA_1372_g2-2222_12-92_nab.tiff
MIN=0  MAX=1  MEAN=0.222881  SD=0.0765229
SatMin=0  SatMax=0.450416  SatMean=0.0389764  SatSD=0.0175917
hist_entries=0.50595

Result of eqLimit.bat: 
MIN=0  MAX=1  MEAN=0.438944  SD=0.218088
SatMin=0  SatMax=0.95903  SatMean=0.135619  SatSD=0.0704111
hist_entries=0.209946



ge_AGA_1372_g2-96917228_0_nab.tiff
MIN=0  MAX=1  MEAN=0.352696  SD=0.0766815
SatMin=0  SatMax=0.568673  SatMean=0.0399109  SatSD=0.0174829
hist_entries=0.456346

Result of eqLimit.bat: 
MIN=0  MAX=1  MEAN=0.392088  SD=0.222641
SatMin=0  SatMax=0.956344  SatMean=0.135368  SatSD=0.0732476
hist_entries=0.214889



ge_AGA_1372_g4_0_nab.tiff
MIN=0  MAX=1  MEAN=0.459242  SD=0.0739551
SatMin=0  SatMax=0.657725  SatMean=0.0388914  SatSD=0.0170443
hist_entries=0.40825

Result of eqLimit.bat: 
MIN=0  MAX=1  MEAN=0.375628  SD=0.222759
SatMin=0  SatMax=0.954376  SatMean=0.133921  SatSD=0.0734108
hist_entries=0.218246



ge_AGA_1372_gnull_ab.tiff
MIN=0  MAX=1  MEAN=0.423099  SD=0.148999
SatMin=0  SatMax=0.881117  SatMean=0.0774137  SatSD=0.0356301
hist_entries=0.239974

Result of eqLimit.bat: 
MIN=0  MAX=1  MEAN=0.40146  SD=0.25841
SatMin=0  SatMax=0.982483  SatMean=0.167987  SatSD=0.114175
hist_entries=0.17453



ge_AGA_1372_g1_0_ab.tiff
MIN=0  MAX=1  MEAN=0.213419  SD=0.15028
SatMin=0  SatMax=0.889418  SatMean=0.0655822  SatSD=0.0433896
hist_entries=0.239974

Result of eqLimit.bat: 
MIN=0  MAX=1  MEAN=0.444576  SD=0.24874
SatMin=0  SatMax=0.982254  SatMean=0.166557  SatSD=0.104453
hist_entries=0.174988



ge_AGA_1372_g1_4-5_ab.tiff
MIN=0  MAX=1  MEAN=0.213419  SD=0.15028
SatMin=0  SatMax=0.889418  SatMean=0.0655822  SatSD=0.0433896
hist_entries=0.239974

Result of eqLimit.bat: 
MIN=0  MAX=1  MEAN=0.444576  SD=0.24874
SatMin=0  SatMax=0.982254  SatMean=0.166557  SatSD=0.104453
hist_entries=0.174988



ge_AGA_1372_g2-2222_0_ab.tiff
MIN=0  MAX=1  MEAN=0.475206  SD=0.135546
SatMin=0  SatMax=0.891859  SatMean=0.0704239  SatSD=0.0324092
hist_entries=0.23996

Result of eqLimit.bat: 
MIN=0  MAX=1  MEAN=0.39444  SD=0.256936
SatMin=0  SatMax=0.981888  SatMean=0.164764  SatSD=0.110691
hist_entries=0.174911



ge_AGA_1372_g2-2222_4-5_ab.tiff
MIN=0  MAX=1  MEAN=0.423098  SD=0.148999
SatMin=0  SatMax=0.881117  SatMean=0.0774136  SatSD=0.0356301
hist_entries=0.239974

Result of eqLimit.bat: 
MIN=0  MAX=1  MEAN=0.401466  SD=0.258408
SatMin=0  SatMax=0.982483  SatMean=0.167987  SatSD=0.114174
hist_entries=0.174423



ge_AGA_1372_g2-2222_12-92_ab.tiff
MIN=0  MAX=1  MEAN=0.455407  SD=0.140659
SatMin=0  SatMax=0.88777  SatMean=0.0730806  SatSD=0.033632
hist_entries=0.23996

Result of eqLimit.bat: 
MIN=0  MAX=1  MEAN=0.396956  SD=0.257525
SatMin=0  SatMax=0.982116  SatMean=0.165968  SatSD=0.112029
hist_entries=0.174561



ge_AGA_1372_g2-96917228_0_ab.tiff
MIN=0  MAX=1  MEAN=0.568608  SD=0.120946
SatMin=0  SatMax=0.917906  SatMean=0.0638491  SatSD=0.0286394
hist_entries=0.23996

Result of eqLimit.bat: 
MIN=0  MAX=1  MEAN=0.392123  SD=0.254533
SatMin=0  SatMax=0.981125  SatMean=0.161988  SatSD=0.106185
hist_entries=0.176117



ge_AGA_1372_g4_0_ab.tiff
MIN=0  MAX=1  MEAN=0.654725  SD=0.103612
SatMin=0  SatMax=0.938399  SatMean=0.0550741  SatSD=0.0247236
hist_entries=0.23996

Result of eqLimit.bat: 
MIN=0  MAX=1  MEAN=0.394276  SD=0.250877
SatMin=0  SatMax=0.980087  SatMean=0.159069  SatSD=0.100076
hist_entries=0.176865


A point of interest here: when the toe-slope is zero, the highest standard deviation comes from gamMaxSd, of course. But the setting -g 2.2222 4.5 gives a slightly higher SD. This suggests a future avenue to explore: varying the toe-slope for the maximum SD.

sRGB version from dcraw or IM?

If we want an sRGB version, we have the choice of making it with dcraw or IM. The dcraw version comes directly from dcraw, with no options for gamma or -W, so it is auto-brightened. The IM version comes from "-set colorspace RGB -colorspace sRGB", from the dcraw output of gamma 1, with auto-brighten.

The numbers from IM's sRGB image are:

 MIN=0  MAX=1  MEAN=0.473262  SD=0.139267
SatMin=0  SatMax=0.893904  SatMean=0.072757  SatSD=0.0331354
hist_entries=0.239974

They are close to the numbers from dcraw's sRGB image. The IM version has a higher mean and lower SD. IM's saturation has a higher maximum, lower mean and lower SD. The number of hist_entries is identical.

The images are:

dcraw's sRGB ge_AGA_1372_gnull_ab_sm.jpg ge_AGA_1372_gnull_ab_hist.png
IM's sRGB ge_im_srgb_sm.jpg ge_im_srgb_hist.png

Confirming the numbers: IM's version has the histogram pushed right slightly, lightening the entire image, especially the shadows, and reducing most contrast.

I see no obvious preference for either version, but standardising on one is useful. I choose to use dcraw's version.

Both sRGB images above have clipped highlights, caused by dcraw's auto-brighten. An alternative is to use a non-auto-brightened source, given a contrast-limited equalisation, further tamed by "+sigmoidal-contrast" to push darkish and lightish tones towards the middle, which reduces the standard deviation and the saturation. The result isn't photometrically sRGB, but it is aesthetically pleasing, useful for further processing, and is not clipped. Here are two versions: the first from dcraw "-g 1 0", the second from unspecified "-g". They are slightly different, but I don't have a clear preference.

%IM%convert ^
  ge_%RAW_BASE%_g1_0_nab_eql.tiff ^
  +sigmoidal-contrast 10,50%% ^
  +write ge_eql_sRGB10.tiff ^
  -define histogram:unique-colors=false ^
  +write histogram:ge_eql_sRGB10_hist.png ^
  %WEB_SIZE% ^
  ge_eql_sRGB10_sm.jpg
ge_eql_sRGB10_sm.jpg ge_eql_sRGB10_hist.png
%IM%convert ^
  ge_%RAW_BASE%_gnull_nab_eql.tiff ^
  +sigmoidal-contrast 10,50%% ^
  +write ge_eql_sRGB.tiff ^
  -define histogram:unique-colors=false ^
  +write histogram:ge_eql_sRGB_hist.png ^
  %WEB_SIZE% ^
  ge_eql_sRGB_sm.jpg
ge_eql_sRGB_sm.jpg ge_eql_sRGB_hist.png

We may prefer an sRGB version that has a specified gamma. What gamma?

Make gamma 0.5 in RGB colorspace, which is about 0.73 in sRGB space.

%IM%convert ^
  ge_%RAW_BASE%_g1_0_ab.tiff ^
  -auto-level ^
  -auto-gamma ^
  -set colorspace RGB -colorspace sRGB ^
  +write ge_alg_sRGB.tiff ^
  -define histogram:unique-colors=false ^
  +write histogram:ge_alg_sRGB_hist.png ^
  %WEB_SIZE% ^
  ge_alg_sRGB_sm.jpg
ge_alg_sRGB_sm.jpg ge_alg_sRGB_hist.png

Make gamma 0.5 in sRGB colorspace.

%IM%convert ^
  ge_%RAW_BASE%_g1_0_ab.tiff ^
  -set colorspace RGB -colorspace sRGB ^
  -auto-level ^
  -auto-gamma ^
  +write ge_alg_sRGB.tiff ^
  -define histogram:unique-colors=false ^
  +write histogram:ge_sRGB_alg_hist.png ^
  %WEB_SIZE% ^
  ge_sRGB_alg_sm.jpg
ge_sRGB_alg_sm.jpg ge_sRGB_alg_hist.png

Conclusions

The questions were:

What are the best settings for two purposes:

  1. To quickly get a usable image?
  2. To get the best-possible data for future processing?

My answers are:

  1. Use default gamma, and auto-brighten, making a _sRGB version.
  2. Use no gamma adjustment (-g 1 0) and prevent auto-brightening (-W), making a _RAW version.

I also create an _eql version. Thus, we have three simple comands:

dcraw -v -H 0 -6 -w -o 1 -T -O out_sRGB.tiff in.nef

dcraw -v -H 0 -6 -w -W -g 1 0 -o 0 -T -O out_raw.tiff in.nef

call %PICTBAT%eqLimit out_raw.tiff . . . out_eql.tiff

The file out_raw.tiff is visually horrible (very dark), but useful for further processing. The two visual outputs are out_sRGB.tiff and out_eql.tiff. Comparing these outputs to in-camera JPEGs made by a Nikon D800, I find that:

Cleanup

We don't need to keep the large TIFF files, so delete them:

del ge_*_*.tiff

Scripts

For convenience, .bat scripts are also available in a single zip file. See Zipped BAT files.

gameql.bat

rem Tests dcraw and eqLimit with a variety of parameters.
rem %1 is input raw file.

set IN_RAW=%1
if not exist "%1" (
  echo %0: "%1" does not exist
)

set RAW_BASE=%~n1

set COUNT_PROC=-separate +append -process 'mkhisto norm' -fill White +opaque Black

set WEB_SIZE=-resize 300x300

set OUT_LIS=ge_gameql.lis
del %OUT_LIS% 2>nul

set OUT_TIFF=%TEMP%\ge_temp.tiff
%IM%dcraw -v -6 -w -W -g 1 0 -o 0 -T -O %OUT_TIFF% %IN_RAW%

call %PICTBAT%gamMaxSd %OUT_TIFF% 0.05 10

call :geOne %IN_RAW% 0 . .
call :geOne %IN_RAW% 0 1 0
call :geOne %IN_RAW% 0 1 4.5
call :geOne %IN_RAW% 0 2.2222 0
call :geOne %IN_RAW% 0 2.2222 4.5
call :geOne %IN_RAW% 0 2.2222 12.92
call :geOne %IN_RAW% 0 %gmsGAM_MAX_SD% 0
call :geOne %IN_RAW% 0 4 0

call :geOne %IN_RAW% 1 . .
call :geOne %IN_RAW% 1 1 0
call :geOne %IN_RAW% 1 1 4.5
call :geOne %IN_RAW% 1 2.2222 0
call :geOne %IN_RAW% 1 2.2222 4.5
call :geOne %IN_RAW% 1 2.2222 12.92
call :geOne %IN_RAW% 1 %gmsGAM_MAX_SD% 0
call :geOne %IN_RAW% 1 4 0


rem ===============================
rem
rem Try sRGB version from IM.

%IM%convert ge_%RAW_BASE%_g1_0_ab.tiff -set colorspace RGB -colorspace sRGB ge_im_srgb.tiff

%IM%convert ^
  ge_im_srgb.tiff ^
  -format "MIN=%%[fx:minima]  MAX=%%[fx:maxima]  MEAN=%%[fx:mean]  SD=%%[fx:standard_deviation]\n" ^
  -write info: ^
  ^( +clone ^
    -colorspace HCL ^
    -format "SatMin=%%[fx:minima.g]  SatMax=%%[fx:maxima.g]  SatMean=%%[fx:mean.g]  SatSD=%%[fx:standard_deviation.g]\n" ^
    -write info: ^
    +delete ^
  ^) ^
NULL:>ge_im_srgb.lis

%IMDEV%convert ge_IM_srgb.tiff %COUNT_PROC% -format "hist_entries=%%[fx:mean]\n" info: >>ge_im_srgb.lis

%IM%convert ^
  ge_IM_srgb.tiff ^
  -define histogram:unique-colors=false ^
  +write histogram:ge_im_srgb_hist.png ^
  %WEB_SIZE% ^
  ge_im_srgb_sm.jpg


exit /B 0


rem ============ Subroutines ===================
rem

rem Params to geOne:
rem  %1 raw filename
rem  %2 0 if -W (no auto-brighten); 1 if auto-brighten
rem  %3 first -g parameter (or "." for no -g)
rem  %4 second -g parameter

:geOne
set G_ARG=
set G_NAME=gnull
set G1=%3
set G2=%4
if not "%3"=="." (
  set G_ARG=-g %3 %4
  set G_NAME=g%G1:.=-%_%G2:.=-%
)
echo G_NAME=%G_NAME%
set W_ARG=
set AB_NAME=ab
if "%2"=="0" (
  set W_ARG=-W
  set AB_NAME=nab
)

set BASE=ge_%RAW_BASE%_%G_NAME%_%AB_NAME%
set OUT_TIFF=%BASE%.tiff
set OUT_EQL=%BASE%_eql.tiff
rem set OUT_LIS=%BASE%.lis
rem del %OUT_LIS% 2>nul

echo OUT_TIFF=%OUT_TIFF%

%IM%dcraw -v -H 0 -6 -w %W_ARG% %G_ARG% -o 0 -T -O %OUT_TIFF% %1
if ERRORLEVEL 1 exit /B 1

%IM%convert ^
  %OUT_TIFF% ^
  -format "%%f\nMIN=%%[fx:minima]  MAX=%%[fx:maxima]  MEAN=%%[fx:mean]  SD=%%[fx:standard_deviation]\n" ^
  -write info: ^
  ^( +clone ^
    -colorspace HCL ^
    -format "SatMin=%%[fx:minima.g]  SatMax=%%[fx:maxima.g]  SatMean=%%[fx:mean.g]  SatSD=%%[fx:standard_deviation.g]\n" ^
    -write info: ^
    +delete ^
  ^) ^
NULL:>>%OUT_LIS%

%IMDEV%convert %OUT_TIFF% %COUNT_PROC% -format "hist_entries=%%[fx:mean]\n\n" info: >>%OUT_LIS%

call %PICTBAT%eqLimit %OUT_TIFF%

echo Result of eqLimit.bat: >>%OUT_LIS%

%IM%convert ^
  %OUT_EQL% ^
  -format "MIN=%%[fx:minima]  MAX=%%[fx:maxima]  MEAN=%%[fx:mean]  SD=%%[fx:standard_deviation]\n" ^
  -write info: ^
  ^( +clone ^
    -colorspace HCL ^
    -format "SatMin=%%[fx:minima.g]  SatMax=%%[fx:maxima.g]  SatMean=%%[fx:mean.g]  SatSD=%%[fx:standard_deviation.g]\n" ^
    -write info: ^
    +delete ^
  ^) ^
NULL:>>%OUT_LIS%

%IMDEV%convert %OUT_EQL% %COUNT_PROC% -format "hist_entries=%%[fx:mean]\n\n\n\n" info: >>%OUT_LIS%


%IM%convert ^
  %OUT_TIFF% ^
  -define histogram:unique-colors=false ^
  +write histogram:%BASE%_hist.png ^
  %WEB_SIZE% ^
  %BASE%_sm.jpg

%IM%convert ^
  %OUT_EQL% ^
  -define histogram:unique-colors=false ^
  +write histogram:%BASE%_eql_hist.png ^
  %WEB_SIZE% ^
  %BASE%_eql_sm.jpg

rem
rem ============ End Subroutines ===================

All images on this page were created by the commands shown, using:

%IM%identify -version
Version: ImageMagick 6.9.0-0 Q16 x64 2014-11-14 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates (built-in): bzlib cairo freetype jbig jng jp2 jpeg lcms lqr pangocairo png ps rsvg tiff webp xml zlib

Source file for this web page is gameql.h1. To re-create this web page, execute "procH1 gameql".


All images on this page were created by the commands shown, using:

%IM%identify -version
Version: ImageMagick 6.9.1--6 Q16 x64 2015-06-20 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP 
Delegates (built-in): bzlib cairo freetype jng jp2 jpeg lcms lqr openexr pangf ERRORLEVEL 1 exit /B 1

%IMH%convert ^
  %OUT_EQL% ^
  -define histogram:unique-colors=false ^
  +write histogram:%BASE%_eql_hist.png ^
  %WEB_SIZE% ^
  %BASE%_eql_sm.jpg

if ERRORLEVEL 1 exit /B 1

rem
rem ============ End Subroutines ===================

All images on this page were created by the commands shown, using:

%IM%identify -version
Version: ImageMagick 6.9.1--6 Q16 x64 2015-06-20 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP 
Delegates (built-in): bzlib cairo freetype jng jp2 jpeg lcms lqr openexr pangocairo png ps rsvg tiff webp xml zlib

Source file for this web page is gameql.h1. To re-create this web page, execute "procH1 gameql".


This page, including the images, is my copyright. Anyone is permitted to use or adapt any of the code, scripts or images for any purpose, including commercial use.

Anyone is permitted to re-publish this page, but only for non-commercial use.

Anyone is permitted to link to this page, including for commercial use.


Page version v1.0 24-Dec-2014.

Page created 14-Oct-2015 17:41:38.

Copyright © 2015 Alan Gibson.