%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/share/hplip/prnt/
Upload File :
Create Path :
Current File : //usr/share/hplip/prnt/colorcal.py

# -*- coding: utf-8 -*-
#
# (c) Copyright 2003-2015 HP Development Company, L.P.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
#
# Author: Don Welch
#

# For type 3 color cal and alignemnt types 5 and 7
COLOR_ALIGN_TABLE = ((71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71),
                        (71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71),
                        (71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71),
                        (71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71),
                        (77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77),
                        (83, 85, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83),
                        (86, 85, 86, 88, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86),
                        (89, 89, 89, 88, 89, 91, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89),
                        (93, 93, 93, 93, 93, 91, 93, 94, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93),
                        (96, 96, 96, 96, 96, 96, 96, 94, 96, 98, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96),
                        (100, 100, 100, 100, 100, 100, 100, 100, 100, 98, 100, 102, 100, 100, 100, 100, 100, 100, 100, 100, 100),
                        (104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 102, 104, 106, 104, 104, 104, 104, 104, 104, 104),
                        (109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 106, 109, 111, 109, 109, 109, 109, 109),
                        (114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 111, 114, 116, 114, 114, 114),
                        (119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 116, 119, 122, 119),
                        (125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 122, 125),
                        (132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132),
                        (139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139),
                        (147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147),
                        (156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156),
                        (167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167) 
                    )

PHOTO_ALIGN_TABLE = ((167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167),
                        (167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167),
                        (167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167),
                        (167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167),
                        (143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143),
                        (125, 122, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125),
                        (119, 122, 119, 116, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119),
                        (114, 114, 114, 116, 114, 111, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114),
                        (109, 109, 109, 109, 109, 111, 109, 106, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109),
                        (104, 104, 104, 104, 104, 104, 104, 106, 104, 102, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104),
                        (100, 100, 100, 100, 100, 100, 100, 100, 100, 102, 100, 98, 100, 100, 100, 100, 100, 100, 100, 100, 100),
                        (96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 98, 96, 94, 96, 96, 96, 96, 96, 96, 96),
                        (93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 94, 93, 91, 93, 93, 93, 93, 93),
                        (89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 91, 89, 88, 89, 89, 89),
                        (86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 88, 86, 85, 86),
                        (83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 85, 83),
                        (81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81),
                        (80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80),
                        (78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78),
                        (74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74),
                        (71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71) 
                    )


COLOR_CAL_TABLE = (# For color cal type 2
    127, 127, 127, 127,
    0,  -40,  40,  0,
    0,  -30,  40,  0,  
    0,  -20,  40,  0,  
    0,  -10,  40,  0,  
    0,   0,   40,  0,  
    0,   10,  40,  0,  
    0,   20,  40,  0,  
    0,   30,  40,  0,  
    0,   40,  40,  0,  
    0,  -40,  30,  0,  
    0,  -30,  30,  0,  
    0,  -20,  30,  0,  
    0,  -10,  30,  0,  
    0,   0,   30,  0,  
    0,   10,  30,  0,
    0,   20,  30,  0,
    0,   30,  30,  0,
    0,   40,  30,  0,
    0,  -40,  20,  0,
    0,  -30,  20,  0,
    0,  -20,  20,  0,
    0,  -10,  20,  0,
    0,   0,   20,  0,
    0,   10,  20,  0,
    0,   20,  20,  0,
    0,   30,  20,  0,
    0,   40,  20,  0,
    0,  -40,  10,  0,
    0,  -30,  10,  0,
    0,  -20,  10,  0,
    0,  -10,  10,  0,
    0,   0,   10,  0,
    0,   10,  10,  0,
    0,   20,  10,  0,
    0,   30,  10,  0,
    0,   40,  10,  0,
    0,  -40,  0,   0, 
    0,  -30,  0,   0,
    0,  -20,  0,   0,
    0,  -10,  0,   0,
    0,   0,   0,   0,
    0,   10,  0,   0,
    0,   20,  0,   0,
    0,   30,  0,   0,
    0,   40,  0,   0,
    0,  -40, -10,  0,
    0,  -30, -10,  0,
    0,  -20, -10,  0,
    0,  -10, -10,  0,
    0,   0,  -10,  0,
    0,   10, -10,  0,
    0,   20, -10,  0,
    0,   30, -10,  0,
    0,   40, -10,  0,
    0,  -40, -20,  0,
    0,  -30, -20,  0,
    0,  -20, -20,  0,
    0,  -10, -20,  0,
    0,   0,  -20,  0,
    0,   10, -20,  0,
    0,   20, -20,  0,
    0,   30, -20,  0,
    0,   40, -20,  0,
    0,  -40, -30,  0,
    0,  -30, -30,  0,
    0,  -20, -30,  0,
    0,  -10, -30,  0,
    0,   0,  -30,  0,
    0,   10, -30,  0,
    0,   20, -30,  0,
    0,   30, -30,  0,
    0,   40, -30,  0,
    0,  -40, -40,  0,
    0,  -30, -40,  0,
    0,  -20, -40,  0,
    0,  -10, -40,  0,
    0,   0,  -40,  0,
    0,   10, -40,  0,
    0,   20, -40,  0,
    0,   30, -40,  0,
    0,   40, -40,  0
)


# Type 4 manual color calibration table

TYPE_4_C_TABLE = \
(
    (32,   32,   32,   32,   32,   32,   32,   32,   32,   32,   32,   32,   32,   32,),
    (32,   32,   32,   32,   32,   32,   32,   32,   32,   32,   32,   32,   32,   32,),
    (21,   21,   21,   21,   21,   21,   21,   21,   21,   21,   21,   21,   21,   21,),
    (21,   21,   21,   21,   21,   21,   21,   21,   21,   21,   21,   21,   21,   21,),
    (11,   11,   11,   11,   11,   11,   11,   11,   11,   11,   11,   11,   11,   11,),
    (11,   11,   11,   11,   11,   11,   11,   11,   11,   11,   11,   11,   11,   11,),
    (0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,),
    (0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,),
    (-11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,),
    (-11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,),
    (-21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,),
    (-21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,),
    (-32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,),
    (-32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,),
)

TYPE_4_M_TABLE = \
(
    (-30,  -30,  -20,  -20,  -10,  -10,  0,  0,  10,  10,  20,  20,  30,  30,),
    (-30,  -30,  -20,  -20,  -10,  -10,  0,  0,  10,  10,  20,  20,  30,  30,),
    (-30,  -30,  -20,  -20,  -10,  -10,  0,  0,  10,  10,  20,  20,  30,  30,),
    (-30,  -30,  -20,  -20,  -10,  -10,  0,  0,  10,  10,  20,  20,  30,  30,),
    (-30,  -30,  -20,  -20,  -10,  -10,  0,  0,  10,  10,  20,  20,  30,  30,),
    (-30,  -30,  -20,  -20,  -10,  -10,  0,  0,  10,  10,  20,  20,  30,  30,),
    (-30,  -30,  -20,  -20,  -10,  -10,  0,  0,  10,  10,  20,  20,  30,  30,),
    (-30,  -30,  -20,  -20,  -10,  -10,  0,  0,  10,  10,  20,  20,  30,  30,),
    (-30,  -30,  -20,  -20,  -10,  -10,  0,  0,  10,  10,  20,  20,  30,  30,),
    (-30,  -30,  -20,  -20,  -10,  -10,  0,  0,  10,  10,  20,  20,  30,  30,),
    (-30,  -30,  -20,  -20,  -10,  -10,  0,  0,  10,  10,  20,  20,  30,  30,),
    (-30,  -30,  -20,  -20,  -10,  -10,  0,  0,  10,  10,  20,  20,  30,  30,),
    (-30,  -30,  -20,  -20,  -10,  -10,  0,  0,  10,  10,  20,  20,  30,  30,),
    (-30,  -30,  -20,  -20,  -10,  -10,  0,  0,  10,  10,  20,  20,  30,  30,),
)

TYPE_4_Y_TABLE = \
(
    (-28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,),
    (8,  28,  8,  28,  8,  28,  8,  28,  8,  28,  8,  28,  8,  28,),
    (-28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,),
    (8,  28,  8,  28,  8,  28,  8,  28,  8,  28,  8,  28,  8,  28,),
    (-28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,),
    (8,  28,  8,  28,  8,  28,  8,  28,  8,  28,  8,  28,  8,  28,),
    (-28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,),
    (-28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,),
    (8,  28,  8,  28,  8,  28,  8,  28,  8,  28,  8,  28,  8,  28,),
    (-28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,),
    (8,  28,  8,  28,  8,  28,  8,  28,  8,  28,  8,  28,  8,  28,),
    (-28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,),
    (8,  28,  8,  28,  8,  28,  8,  28,  8,  28,  8,  28,  8,  28,),
    (-28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,  -28,  -8,),
)

TYPE_4_LC_TABLE = \
(
    (-31,  -21,  -10,  0,  10,  21,  31,),
    (-31,  -21,  -10,  0,  10,  21,  31,),
    (-31,  -21,  -10,  0,  10,  21,  31,),
    (-31,  -21,  -10,  0,  10,  21,  31,),
    (-31,  -21,  -10,  0,  10,  21,  31,),
    (-31,  -21,  -10,  0,  10,  21,  31,),
    (-31,  -21,  -10,  0,  10,  21,  31,),
)

TYPE_4_LM_TABLE = \
(
    (29,   29,   29,   29,   29,   29,   29,),
    (19,   19,   19,   19,   19,   19,   19,),
    (10,   10,   10,   10,   10,   10,   10,),
    (0,    0,    0,    0,    0,    0,    0,),
    (-10,  -10,  -10,  -10,  -10,  -10,  -10,),
    (-19,  -19,  -19,  -19,  -19,  -19,  -19,),
    (-29,  -29,  -29,  -29,  -29,  -29,  -29,),
)

Zerion Mini Shell 1.0