[argyllcms] Tweaked printtarg for DTP22

  • From: Nigel Rowe <argy@xxxxxxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Fri, 21 Dec 2007 19:56:04 +1100

Greetings all.

I'm trying to generate a printer profile using a DTP-22 and have tweaked 
printtarg to make better (ie. easier to make and use) DTP22 targets

It's basically the same as the target for the spectroscan, but tweaked 
with:
- larger default patches (since I'm manually positioning the instrument) 
- patch contrast sorting turned on (easier to position the instrument)
- and (because I spent an hour manually reading the wrong !@#$%* target)  
  annotated with the chart name, random start# and date/time generated.

Patch attached.

-- 
    Nigel Rowe
    argy \N{COMMERCIAL AT} fisheggs \N{FULL STOP} name


--- ./target/printtarg.c.orig   2007-10-20 11:54:05.000000000 +1000
+++ ./target/printtarg.c        2007-12-21 19:53:23.000000000 +1100
@@ -1388,6 +1388,35 @@
                if (npat > 4095)
                        error ("Number of patchs %d exceeds maximum of 4095 for 
DTP20");
 
+       } else if (itype == instDTP22 ) {       /* Xrite dtp22 digital 
swatchbook */
+               domaxmin = 0;                   /* Don't print max and min 
patches */
+               nextrap = 0;                    /* Number of extra patches for 
max and min */
+               nmaxp = nminp = 0;              /* Extra max/min patches */
+               nextrap = nmaxp + nminp;/* Number of extra patches for max and 
min */
+               dorspace = 1;                   /* Maximise number of rows */
+               padlrow = 0;                    /* Pad the last row with white 
*/
+               spacer = 0;                             /* No spacer */
+               usede = 1;                              /* Use delta E to 
maximize patch/spacer conrast */
+               needpc = 1;                             /* Helps to have patch 
to patch contrast in a row ? */
+               lspa  = 8.0 + bord;             /* Leader space before first 
patch - allow space for text */
+               lcar  = 0.0;                    /* Leading clear area before 
first patch */
+               plen = pscale * 8.0;    /* Patch min length */
+               hxew = hxeh = 0.0;              /* No extra padding because no 
hex */
+               pspa  = 0.0;                    /* Inbetween Patch spacer */
+               tspa  = 0.0;                    /* Clear space after last patch 
*/
+               pwid  = pscale * 8.0;   /* Patch min width */
+               rrsp  = pscale * 8.0;   /* Row center to row center spacing */
+               pwex  = 0.0;                    /* Patch width expansion 
between rows of a strip */
+               mxpprow = MAXPPROW;             /* Maximum patches per row 
permitted */
+               mxrowl = 1000.0;                /* Maximum row length */
+               tidrows = 0;                    /* No rows on first page for 
target ID */
+               rpstrip = 999;                  /* Rows per strip */
+               txhi  = 5.0;                    /* Text Height */
+               docutmarks = 0;                 /* Don't generate strip cut 
marks */
+               clwi  = 0.0;                    /* Cut line width */
+               dorowlabel = 1;                 /* Generate row labels */
+               rlwi = 8.0;                     /* Row label width */
+
        } else {
                error("Unsupported intrument type");
        }
@@ -2016,8 +2045,9 @@
        }
        fprintf(stderr,"usage: printtarg [-v] [-i instr] [-r] [-s] [-p size] 
basename\n");
        fprintf(stderr," -v              Verbose mode\n");
-       fprintf(stderr," -i 20 | 41 | 51 | SS | i1 Select target instrument 
(default DTP41)\n");
-       fprintf(stderr,"                 20 = DTP20, 41 = DTP41, 51 = DTP51, SS 
= SpectroScan, i1 = i1Pro\n");
+       fprintf(stderr," -i 20 | 22 | 41 | 51 | SS | i1 Select target 
instrument (default DTP41)\n");
+       fprintf(stderr,"                 20 = DTP20, 22 = DTP22, 41 = DTP41, 51 
= DTP51,\n");
+       fprintf(stderr,"                 SS = SpectroScan, i1 = i1Pro\n");
        fprintf(stderr," -h              Use hexagon patches for SS\n");
        fprintf(stderr," -a scale        Scale patch size and spacers by factor 
(e.g. 0.857 or 1.5 etc.)\n");
        fprintf(stderr," -A scale        Scale spacers by additional factor 
(e.g. 0.857 or 1.5 etc.)\n");
@@ -2078,7 +2108,7 @@
        int nchan = 0;                  /* Number of device chanels */
        int i;
        int si, fi, wi;                 /* sample id index, field index, 
keyWord index */
-       char *label = "Argyll Color Management System - Test chart";
+       char label[200] = "Argyll Color Management System - Test chart";
        double marg = DEF_MARGINE;      /* Margin from paper edge in mm */
        paper *pap = NULL;              /* Paper size pointer, NULL if custom */
        double cwidth, cheight; /* Custom paper width and height in mm */
@@ -2310,6 +2340,8 @@
                                        itype = instDTP51;
                                else if (strcmp("20", na) == 0)
                                        itype = instDTP20;
+                               else if (strcmp("22", na) == 0)
+                                       itype = instDTP22;
                                else if (strcmp("41", na) == 0)
                                        itype = instDTP41;
                                else if (strcmp("SS", na) == 0 || strcmp("ss", 
na) == 0)
@@ -2641,6 +2673,8 @@
        } else
                pcol = pcold;           /* Density spacer alues */
 
+       sprintf(label, "Argyll Color Management System - Test chart \"%s\" (%s 
%d) %s",
+               psname, rand ? "Random Start" : "Chart ID", rstart, atm);
        generate_ps(itype, psname, cols, npat, label,
                    pap != NULL ? pap->w : cwidth, pap != NULL ? pap->h : 
cheight,
                    marg, rand, rstart, saix, paix,     ixord,
--- ./doc/targen.html.orig      2007-10-20 11:54:17.000000000 +1000
+++ ./doc/targen.html   2007-12-21 17:53:16.000000000 +1100
@@ -552,6 +552,20 @@
 &nbsp; &nbsp; &nbsp; &nbsp;4xLetterR&nbsp; 4032<br>
 &nbsp; &nbsp; &nbsp; &nbsp;<br>
 <br>
+&nbsp; DTP22 (Digital swatchbook):<br>
+<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A4 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 782<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A3
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1700<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Letter 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 736<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Legal 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 943<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 11x17 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1581<br>
 <br>
 <br>
 <br>

Other related posts:

  • » [argyllcms] Tweaked printtarg for DTP22