kopia lustrzana https://gitlab.com/sane-project/backends
epson2: added support for color correction profiles
Color correction profiles have been imported from the epkowa driver. The user can specify his own or let the backend choice. The feature is not enabled by default. This feature is in beta stage, works only for color scans and automatic mode. Enable with --color-correction 'Automatic'merge-requests/1/head
rodzic
a05e6e078b
commit
3730e34c91
|
@ -456,13 +456,13 @@ libsane_epson_la_LDFLAGS = $(DIST_SANELIBS_LDFLAGS)
|
|||
libsane_epson_la_LIBADD = $(COMMON_LIBS) libepson.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pio.lo $(SCSI_LIBS) $(USB_LIBS)
|
||||
EXTRA_DIST += epson.conf.in
|
||||
|
||||
libepson2_la_SOURCES = epson2.c epson2.h epson2_scsi.c epson2_scsi.h epson_usb.c epson2_net.c epson2_net.h epson2-io.c epson2-io.h epson2-commands.c epson2-commands.h epson2-ops.c epson2-ops.h
|
||||
libepson2_la_SOURCES = epson2.c epson2.h epson2_scsi.c epson2_scsi.h epson_usb.c epson2_net.c epson2_net.h epson2-io.c epson2-io.h epson2-commands.c epson2-commands.h epson2-ops.c epson2-ops.h epson2-cct.c
|
||||
libepson2_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=epson2
|
||||
|
||||
nodist_libsane_epson2_la_SOURCES = epson2-s.c
|
||||
libsane_epson2_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=epson2
|
||||
libsane_epson2_la_LDFLAGS = $(DIST_SANELIBS_LDFLAGS)
|
||||
libsane_epson2_la_LIBADD = $(COMMON_LIBS) libepson2.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo $(SCSI_LIBS) $(USB_LIBS) $(SOCKET_LIBS)
|
||||
libsane_epson2_la_LIBADD = $(COMMON_LIBS) libepson2.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo $(SCSI_LIBS) $(USB_LIBS) $(SOCKET_LIBS) $(MATH_LIB)
|
||||
EXTRA_DIST += epson2.conf.in
|
||||
|
||||
libfujitsu_la_SOURCES = fujitsu.c fujitsu.h fujitsu-scsi.h
|
||||
|
|
|
@ -132,7 +132,8 @@ libepson2_la_LIBADD =
|
|||
am_libepson2_la_OBJECTS = libepson2_la-epson2.lo \
|
||||
libepson2_la-epson2_scsi.lo libepson2_la-epson_usb.lo \
|
||||
libepson2_la-epson2_net.lo libepson2_la-epson2-io.lo \
|
||||
libepson2_la-epson2-commands.lo libepson2_la-epson2-ops.lo
|
||||
libepson2_la-epson2-commands.lo libepson2_la-epson2-ops.lo \
|
||||
libepson2_la-epson2-cct.lo
|
||||
libepson2_la_OBJECTS = $(am_libepson2_la_OBJECTS)
|
||||
libfujitsu_la_LIBADD =
|
||||
am_libfujitsu_la_OBJECTS = libfujitsu_la-fujitsu.lo
|
||||
|
@ -510,7 +511,8 @@ libsane_epson2_la_DEPENDENCIES = $(COMMON_LIBS) libepson2.la \
|
|||
sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo \
|
||||
../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo \
|
||||
../sanei/sanei_udp.lo $(am__DEPENDENCIES_1) \
|
||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
|
||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
|
||||
$(am__DEPENDENCIES_1)
|
||||
nodist_libsane_epson2_la_OBJECTS = libsane_epson2_la-epson2-s.lo
|
||||
libsane_epson2_la_OBJECTS = $(nodist_libsane_epson2_la_OBJECTS)
|
||||
libsane_epson2_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
|
@ -1852,12 +1854,12 @@ nodist_libsane_epson_la_SOURCES = epson-s.c
|
|||
libsane_epson_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=epson
|
||||
libsane_epson_la_LDFLAGS = $(DIST_SANELIBS_LDFLAGS)
|
||||
libsane_epson_la_LIBADD = $(COMMON_LIBS) libepson.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pio.lo $(SCSI_LIBS) $(USB_LIBS)
|
||||
libepson2_la_SOURCES = epson2.c epson2.h epson2_scsi.c epson2_scsi.h epson_usb.c epson2_net.c epson2_net.h epson2-io.c epson2-io.h epson2-commands.c epson2-commands.h epson2-ops.c epson2-ops.h
|
||||
libepson2_la_SOURCES = epson2.c epson2.h epson2_scsi.c epson2_scsi.h epson_usb.c epson2_net.c epson2_net.h epson2-io.c epson2-io.h epson2-commands.c epson2-commands.h epson2-ops.c epson2-ops.h epson2-cct.c
|
||||
libepson2_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=epson2
|
||||
nodist_libsane_epson2_la_SOURCES = epson2-s.c
|
||||
libsane_epson2_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=epson2
|
||||
libsane_epson2_la_LDFLAGS = $(DIST_SANELIBS_LDFLAGS)
|
||||
libsane_epson2_la_LIBADD = $(COMMON_LIBS) libepson2.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo $(SCSI_LIBS) $(USB_LIBS) $(SOCKET_LIBS)
|
||||
libsane_epson2_la_LIBADD = $(COMMON_LIBS) libepson2.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo $(SCSI_LIBS) $(USB_LIBS) $(SOCKET_LIBS) $(MATH_LIB)
|
||||
libfujitsu_la_SOURCES = fujitsu.c fujitsu.h fujitsu-scsi.h
|
||||
libfujitsu_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=fujitsu
|
||||
nodist_libsane_fujitsu_la_SOURCES = fujitsu-s.c
|
||||
|
@ -2674,6 +2676,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdll_la-dll.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmc_la-dmc.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libepjitsu_la-epjitsu.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libepson2_la-epson2-cct.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libepson2_la-epson2-commands.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libepson2_la-epson2-io.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libepson2_la-epson2-ops.Plo@am__quote@
|
||||
|
@ -3108,6 +3111,13 @@ libepson2_la-epson2-ops.lo: epson2-ops.c
|
|||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libepson2_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libepson2_la-epson2-ops.lo `test -f 'epson2-ops.c' || echo '$(srcdir)/'`epson2-ops.c
|
||||
|
||||
libepson2_la-epson2-cct.lo: epson2-cct.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libepson2_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libepson2_la-epson2-cct.lo -MD -MP -MF $(DEPDIR)/libepson2_la-epson2-cct.Tpo -c -o libepson2_la-epson2-cct.lo `test -f 'epson2-cct.c' || echo '$(srcdir)/'`epson2-cct.c
|
||||
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libepson2_la-epson2-cct.Tpo $(DEPDIR)/libepson2_la-epson2-cct.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='epson2-cct.c' object='libepson2_la-epson2-cct.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libepson2_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libepson2_la-epson2-cct.lo `test -f 'epson2-cct.c' || echo '$(srcdir)/'`epson2-cct.c
|
||||
|
||||
libfujitsu_la-fujitsu.lo: fujitsu.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfujitsu_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfujitsu_la-fujitsu.lo -MD -MP -MF $(DEPDIR)/libfujitsu_la-fujitsu.Tpo -c -o libfujitsu_la-fujitsu.lo `test -f 'fujitsu.c' || echo '$(srcdir)/'`fujitsu.c
|
||||
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libfujitsu_la-fujitsu.Tpo $(DEPDIR)/libfujitsu_la-fujitsu.Plo
|
||||
|
|
|
@ -0,0 +1,552 @@
|
|||
/* epson2 hardware colour correction coefficients
|
||||
* Copyright (C) 2001-2009 SEIKO EPSON Corporation
|
||||
* Copyright (C) 2009 Tower Technologies
|
||||
*
|
||||
* License: GPLv2
|
||||
*
|
||||
* This file is part of the SANE epson2 backend and has been derived
|
||||
* from the epkowa backend distributed with Image Scan!
|
||||
*
|
||||
*/
|
||||
|
||||
/*! Hardware colour correction coefficients (CCC).
|
||||
|
||||
Each entry starts with a unique identifier, followed by four CCC
|
||||
profiles; the first is for reflective materials, the second for
|
||||
colour negatives, the third for monochrome negatives, and the
|
||||
fourth and last one is for colour positives.
|
||||
*/
|
||||
|
||||
#define DEBUG_DECLARE_ONLY
|
||||
|
||||
#include "epson2.h"
|
||||
|
||||
const struct epson_profile epson_cct_profiles[] = {
|
||||
{0x00, /* default */
|
||||
{{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x05, /* ES-6000H */
|
||||
{{1.1419,-0.0596,-0.0825,-0.1234, 1.2812,-0.1413, 0.0703,-0.5720, 1.5016},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.1419,-0.0596,-0.0825,-0.1234, 1.2812,-0.1413, 0.0703,-0.5720, 1.5016}}},
|
||||
{0x06, /* GT-6600 */
|
||||
{{1.1442,-0.0705,-0.0737,-0.0702, 1.1013,-0.0311,-0.0080,-0.3588, 1.3668},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x07, /* GT-7600 */
|
||||
{{1.1967,-0.1379,-0.0588,-0.0538, 1.0385, 0.0153, 0.0348,-0.4070, 1.3721},
|
||||
{1.0010,-0.0010, 0.0000,-0.1120, 1.1710,-0.0590, 0.0000,-0.0910, 1.0920},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.1967,-0.1379,-0.0588,-0.0538, 1.0385, 0.0153, 0.0348,-0.4070, 1.3721}}},
|
||||
{0x0D, /* ES-2000 */
|
||||
{{1.1980,-0.1365,-0.0616,-0.1530, 1.1729,-0.0198,-0.0025,-0.2776, 1.2801},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.1980,-0.1365,-0.0616,-0.1530, 1.1729,-0.0198,-0.0025,-0.2776, 1.2801}}},
|
||||
{0x0F, /* ES-8500 */
|
||||
{{1.0961,-0.0181,-0.0779,-0.1279, 1.1957,-0.0678, 0.0315,-0.3891, 1.3576},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0961,-0.0181,-0.0779,-0.1279, 1.1957,-0.0678, 0.0315,-0.3891, 1.3576}}},
|
||||
{0x15, /* GT-6700 */
|
||||
{{1.0999,-0.0425,-0.0574,-0.0806, 1.0835,-0.0028, 0.0057,-0.2924, 1.2866},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x16, /* GT-8700 */
|
||||
{{1.2020,-0.1518,-0.0502,-0.0847, 1.1385,-0.0538, 0.0059,-0.3255, 1.3196},
|
||||
{1.0030,-0.0030, 0.0000,-0.0980, 1.1500,-0.0520,-0.0030,-0.0840, 1.0880},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.2456,-0.1617,-0.0839,-0.1160, 1.1862,-0.0702,-0.0036,-0.3438, 1.3473}}},
|
||||
{0x18, /* GT-7700 */
|
||||
{{1.1339,-0.0526,-0.0813,-0.1177, 1.1661,-0.0485,-0.0030,-0.3298, 1.3328},
|
||||
{1.0010,-0.0010, 0.0000,-0.1120, 1.1710,-0.0590, 0.0000,-0.0910, 1.0920},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.2066,-0.0360,-0.1706,-0.1313, 1.2523,-0.1210,-0.0299,-0.3377, 1.3676}}},
|
||||
{0x1A, /* ES-9000H */
|
||||
{{1.0986, 0.0235,-0.1221,-0.1294, 1.0896, 0.0399, 0.0928,-0.6043, 1.5115},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x1B, /* ES-2200 */
|
||||
{{1.1855,-0.1372,-0.0483,-0.2060, 1.2468,-0.0407, 0.0358,-0.3059, 1.2701},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.1976,-0.1182,-0.0794,-0.1578, 1.2720,-0.1142, 0.0122,-0.3467, 1.3345}}},
|
||||
{0x1D, /* GT-7200 */
|
||||
{{1.0675,-0.0586,-0.0088,-0.0332, 0.9716, 0.0616, 0.0175,-0.4054, 1.3879},
|
||||
{1.0090,-0.0090, 0.0000,-0.0390, 1.0750,-0.0360,-0.0070,-0.1060, 1.1130},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.1394,-0.0829,-0.0564,-0.0003, 1.0008,-0.0004,-0.0059,-0.3674, 1.3733}}},
|
||||
{0x1F, /* GT-8200 */
|
||||
{{1.0800,-0.0607,-0.0193,-0.0787, 1.0846,-0.0059, 0.0135,-0.3334, 1.3199},
|
||||
{1.0040,-0.0040, 0.0000,-0.0780, 1.1360,-0.0570,-0.0020,-0.0810, 1.0830},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.1334,-0.0929,-0.0405,-0.0418, 1.0689,-0.0271,-0.0521,-0.3262, 1.3783}}},
|
||||
{0x21, /* GT-9700 */
|
||||
{{1.0919,-0.0739,-0.0180,-0.0941, 1.1150,-0.0209, 0.0220,-0.3744, 1.3524},
|
||||
{1.0090,-0.0100, 0.0010,-0.0720, 1.1310,-0.0600, 0.0000,-0.1000, 1.1000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.1374,-0.1396, 0.0021,-0.0489, 1.0655,-0.0166, 0.0081,-0.3492, 1.3411}}},
|
||||
{0x23, /* GT-7300 */
|
||||
{{1.0339,-0.0166,-0.0173,-0.0117, 0.9797, 0.0319, 0.0010,-0.3609, 1.3599},
|
||||
{1.0090,-0.0090, 0.0000,-0.0390, 1.0750,-0.0360,-0.0070,-0.1060, 1.1130},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.1666,-0.0898,-0.0768,-0.0076, 1.0157,-0.0081, 0.0012,-0.3048, 1.3036}}},
|
||||
{0x25, /* GT-8300 */
|
||||
{{1.0800,-0.0607,-0.0193,-0.0787, 1.0846,-0.0059, 0.0135,-0.3334, 1.3199},
|
||||
{1.0040,-0.0040, 0.0000,-0.0780, 1.1360,-0.0570,-0.0020,-0.0810, 1.0830},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.1334,-0.0929,-0.0405,-0.0418, 1.0689,-0.0271,-0.0521,-0.3262, 1.3783}}},
|
||||
{0x27, /* GT-9300 */
|
||||
{{1.0919,-0.0739,-0.0180,-0.0941, 1.1150,-0.0209, 0.0220,-0.3744, 1.3524},
|
||||
{1.0083,-0.0094, 0.0011,-0.0760, 1.1379,-0.0619,-0.0002,-0.0945, 1.0947},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.1952,-0.1519,-0.0433,-0.0932, 1.1613,-0.0681,-0.0418,-0.3140, 1.3558}}},
|
||||
{0x29, /* GT-9800F */
|
||||
{{1.0369,-0.0210,-0.0160,-0.0820, 1.1160,-0.0341, 0.0150,-0.5035, 1.4885},
|
||||
{1.0122,-0.0151, 0.0029,-0.0861, 1.1402,-0.0542,-0.0061,-0.1607, 1.1669},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.1764,-0.1749,-0.0014,-0.0590, 1.0983,-0.0393, 0.0208,-0.5194, 1.4986}}},
|
||||
{0x2B, /* ES-7000H */
|
||||
{{1.0305,-0.0116,-0.0189,-0.0936, 1.1245,-0.0309,-0.0072,-0.1413, 1.1485},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x32, /* GT-9400 */
|
||||
{{1.0932,-0.0529,-0.0403,-0.1077, 1.1416,-0.0338, 0.0079,-0.5525, 1.5446},
|
||||
{1.0259,-0.0356, 0.0097,-0.1085, 1.2225,-0.1140,-0.0046,-0.1848, 1.1894},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.2720,-0.2665,-0.0054,-0.0672, 1.1301,-0.0629,-0.0048,-0.3917, 1.3965}}},
|
||||
{0x2D, /* CC-600PX */
|
||||
{{1.0436,-0.0078,-0.0359,-0.0169, 1.0114, 0.0056, 0.0308,-0.4425, 1.4117},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x3A, /* PM-A850 */
|
||||
{{1.1150,-0.0677,-0.0473,-0.1179, 1.1681,-0.0502, 0.0052,-0.4858, 1.4806},
|
||||
{1.0133,-0.0151, 0.0017,-0.1216, 1.2207,-0.0991,-0.0003,-0.1512, 1.1515},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.2105,-0.1644,-0.0461,-0.1124, 1.1945,-0.0820,-0.0450,-0.3367, 1.3817}}},
|
||||
{0x36, /* CX5300/CX5400 */
|
||||
{{1.0848,-0.0153,-0.0695,-0.0902, 1.0611, 0.0291, 0.0344,-0.5002, 1.4658},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x34, /* GT-X700 */
|
||||
{{1.1032,-0.0590,-0.0442,-0.1915, 1.3371,-0.1456, 0.0387,-0.5804, 1.5417},
|
||||
{1.0232,-0.0258, 0.0026,-0.1296, 1.2882,-0.1587,-0.0011,-0.1928, 1.1940},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.2662,-0.2664, 0.0002,-0.1050, 1.3168,-0.2118,-0.0058,-0.4370, 1.4428}}},
|
||||
{0x38, /* RX500/RX510 */
|
||||
{{1.1150,-0.0677,-0.0473,-0.1179, 1.1681,-0.0502, 0.0052,-0.4858, 1.4806},
|
||||
{1.0133,-0.0151, 0.0017,-0.1216, 1.2207,-0.0991,-0.0003,-0.1512, 1.1515},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.2105,-0.1644,-0.0461,-0.1124, 1.1945,-0.0820,-0.0450,-0.3367, 1.3817}}},
|
||||
{0x37, /* CX6300/CX6400 */
|
||||
{{0.9640, 0.1455,-0.1095, 0.0108, 1.1933,-0.2041, 0.0071,-0.3487, 1.3416},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x3F, /* ES-10000G */
|
||||
{{1.1223,-0.0985,-0.0238,-0.0847, 1.1502,-0.0655, 0.0118,-0.5022, 1.4904},
|
||||
{1.0077,-0.0129, 0.0052,-0.0904, 1.1785,-0.0881, 0.0000,-0.1528, 1.1528},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.1927,-0.1646,-0.0280,-0.0655, 1.1033,-0.0378, 0.0034,-0.4173, 1.4139}}},
|
||||
{0x41, /* GT-F500/F550 */
|
||||
{{1.0732,-0.0581,-0.0150,-0.0897, 1.1553,-0.0657,-0.0179,-0.6500, 1.6679},
|
||||
{1.0163,-0.0203, 0.0040,-0.1125, 1.1797,-0.0672,-0.0091,-0.2343, 1.2434},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.2437,-0.2022,-0.0415,-0.0352, 1.0735,-0.0383,-0.0188,-0.5020, 1.5209}}},
|
||||
{0x43, /* GT-F600 */
|
||||
{{1.0782,-0.0697,-0.0085,-0.1605, 1.2862,-0.1257, 0.0148,-0.5854, 1.5706},
|
||||
{1.0136,-0.0151, 0.0016,-0.1836, 1.3422,-0.1586,-0.0014,-0.1851, 1.1865},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.1491,-0.1456,-0.0035,-0.0990, 1.2657,-0.1666, 0.0015,-0.3868, 1.3853}}},
|
||||
{0x46, /* CX3500/CX3600/CX4500/CX4600 */
|
||||
{{0.9828, 0.0924,-0.0752, 0.0255, 1.1510,-0.1765, 0.0049,-0.3250, 1.3201},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x48, /* PM-A700/RX420/RX430 */
|
||||
{{0.9716, 0.0927,-0.0643, 0.0010, 1.1068,-0.1078, 0.0101,-0.3046, 1.2945},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x49, /* CX6500/CX6600 */
|
||||
{{0.9640, 0.1455,-0.1095, 0.0108, 1.1933,-0.2041, 0.0071,-0.3487, 1.3416},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x4B, /* PM-A870 */
|
||||
{{1.1150,-0.0677,-0.0473,-0.1179, 1.1681,-0.0502, 0.0052,-0.4858, 1.4806},
|
||||
{1.0133,-0.0151, 0.0017,-0.1216, 1.2207,-0.0991,-0.0003,-0.1512, 1.1515},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.2105,-0.1644,-0.0461,-0.1124, 1.1945,-0.0820,-0.0450,-0.3367, 1.3817}}},
|
||||
{0x4D, /* PM-A900 */
|
||||
{{1.1011,-0.0824,-0.0186,-0.0970, 1.1991,-0.1021,-0.0161,-0.6247, 1.6408},
|
||||
{1.0259,-0.0356, 0.0097,-0.1085, 1.2225,-0.1140,-0.0046,-0.1848, 1.1894},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.2150,-0.2074,-0.0076,-0.0521, 1.1430,-0.0909,-0.0204,-0.4156, 1.4360}}},
|
||||
{0x4F, /* GT-X800 */
|
||||
{{1.1052,-0.0850,-0.0202,-0.1050, 1.2294,-0.1245,-0.0486,-0.4160, 1.4646},
|
||||
{1.0255,-0.0272, 0.0017,-0.0919, 1.2098,-0.1180,-0.0021,-0.1296, 1.1317},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.2950,-0.2619,-0.0332,-0.0562, 1.1587,-0.1025,-0.0397,-0.3100, 1.3497}}},
|
||||
{0x51, /* LP-A500 */
|
||||
{{1.0614,-0.0361,-0.0253,-0.1081, 1.1320,-0.0240,-0.0536,-0.2045, 1.2580},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x52, /* GT-F520/F570 */
|
||||
{{1.0978,-0.0806,-0.0173,-0.0802, 1.1515,-0.0713,-0.0476,-0.4656, 1.5132},
|
||||
{1.0192,-0.0192, 0.0000,-0.0974, 1.1846,-0.0872,-0.0031,-0.1797, 1.1828},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.2490,-0.2030,-0.0460,-0.0469, 1.1046,-0.0577,-0.0361,-0.3857, 1.4217}}},
|
||||
{0x54, /* GT-X750 */
|
||||
{{1.0905,-0.0654,-0.0251,-0.1030, 1.1801,-0.0771,-0.0685,-0.4238, 1.4923},
|
||||
{1.0206,-0.0207, 0.0000,-0.0890, 1.1770,-0.0880,-0.0014,-0.1450, 1.1464},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.3041,-0.2907,-0.0134,-0.0383, 1.0908,-0.0525,-0.0327,-0.2947, 1.3275}}},
|
||||
{0x56, /* LP-M5500 */
|
||||
{{1.0784,-0.0560,-0.0224,-0.1793, 1.2234,-0.0441,-0.0041,-0.2636, 1.2677},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x57, /* Stylus CX3700/CX3800/DX3800 */
|
||||
{{0.9828, 0.0924,-0.0752, 0.0255, 1.1510,-0.1765, 0.0049,-0.3250, 1.3201},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x58, /* PX-A650/Stylus CX4700/CX4800/DX4800 */
|
||||
{{0.9716, 0.0927,-0.0643, 0.0010, 1.1068,-0.1078, 0.0101,-0.3046, 1.2945},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x59, /* Stylus CX4100/CX4200/DX4200 */
|
||||
{{0.9716, 0.0927,-0.0643, 0.0010, 1.1068,-0.1078, 0.0101,-0.3046, 1.2945},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x5B, /* Stylus CX7700/CX7800 */
|
||||
{{0.9764, 0.1095,-0.0859, 0.0149, 1.1154,-0.1303, 0.0051,-0.2851, 1.2800},
|
||||
{1.0024,-0.0149, 0.0124,-0.2569, 1.3432,-0.0864,-0.0043,-0.1306, 1.1349},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.1003,-0.0493,-0.0510,-0.1607, 1.2748,-0.1142,-0.0059,-0.3161, 1.3220}}},
|
||||
{0x5D, /* Stylus Photo RX520/RX530 */
|
||||
{{0.9764, 0.1095,-0.0859, 0.0149, 1.1154,-0.1303, 0.0051,-0.2851, 1.2800},
|
||||
{1.0024,-0.0149, 0.0124,-0.2569, 1.3432,-0.0864,-0.0043,-0.1306, 1.1349},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.1003,-0.0493,-0.0510,-0.1607, 1.2748,-0.1142,-0.0059,-0.3161, 1.3220}}},
|
||||
{0x5F, /* Stylus Photo RX640/RX650 */
|
||||
{{1.0697,-0.0561,-0.0137,-0.0824, 1.1291,-0.0467,-0.0390,-0.5218, 1.5608},
|
||||
{1.0208,-0.0209, 0.0000,-0.0923, 1.2017,-0.1093,-0.0020,-0.1290, 1.1310},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.2606,-0.2125,-0.0482,-0.0567, 1.1441,-0.0874,-0.0431,-0.3490, 1.3921}}},
|
||||
{0x61, /* PM-A950 */
|
||||
{{1.0921,-0.0722,-0.0199,-0.0831, 1.1550,-0.0718,-0.0452,-0.3721, 1.4173},
|
||||
{1.0168,-0.0168, 0.0000,-0.0953, 1.1928,-0.0975,-0.0012,-0.1235, 1.1247},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.2603,-0.2763, 0.0155,-0.0398, 1.1033,-0.0635,-0.0249,-0.2675, 1.2924}}},
|
||||
{0x63, /* GT-X900 */
|
||||
{{1.0976,-0.0789,-0.0187,-0.0958, 1.1821,-0.0863,-0.0565,-0.4179, 1.4744},
|
||||
{1.0250,-0.0267, 0.0016,-0.0930, 1.2108,-0.1178,-0.0022,-0.1296, 1.1317},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.3111,-0.2979,-0.0132,-0.0441, 1.1148,-0.0707,-0.0348,-0.2971, 1.3319}}},
|
||||
{0x65, /* ES-H300 */
|
||||
{{1.0359,-0.0146,-0.0213,-0.0752, 1.0963,-0.0211,-0.0456,-0.3238, 1.3693},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x66, /* GT-S600/F650, Perfection V10/V100 */
|
||||
{{1.0878,-0.0667,-0.0211,-0.0892, 1.1513,-0.0622,-0.0654,-0.5175, 1.5829},
|
||||
{1.0208,-0.0209, 0.0000,-0.0923, 1.2017,-0.1093,-0.0020,-0.1290, 1.1310},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.2688,-0.2522,-0.0166,-0.0559, 1.1291,-0.0733,-0.0377,-0.3519, 1.3896}}},
|
||||
{0x68, /* GT-F700, Perfection V350 */
|
||||
{{1.0950,-0.0646,-0.0305,-0.0792, 1.1398,-0.0606,-0.0123,-0.5175, 1.5298},
|
||||
{1.0258,-0.0306, 0.0048,-0.0995, 1.2173,-0.1178,-0.0054,-0.1242, 1.1296},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.2697,-0.2501,-0.0195,-0.0351, 1.1236,-0.0885,-0.0131,-0.3268, 1.3400}}},
|
||||
{0x6A, /* Stylus CX2800/CX2900/ME200 */
|
||||
{{0.9828, 0.0924,-0.0752, 0.0255, 1.1510,-0.1765, 0.0049,-0.3250, 1.3201},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x6B, /* Stylus PX-A620, CX3900/DX4000 */
|
||||
{{0.9828, 0.0924,-0.0752, 0.0255, 1.1510,-0.1765, 0.0049,-0.3250, 1.3201},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x6C, /* Stylus CX5900/CX6000/DX6000 */
|
||||
{{0.9716, 0.0927,-0.0643, 0.0010, 1.1068,-0.1078, 0.0101,-0.3046, 1.2945},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x70, /* Stylus Photo RX560/RX580/RX590 */
|
||||
{{0.9533, 0.0885,-0.0418, 0.0033, 1.0627,-0.0660,-0.0137,-0.1904, 1.2041},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x71, /* PM-A920 */
|
||||
{{1.0697,-0.0561,-0.0137,-0.0824, 1.1291,-0.0467,-0.0390,-0.5218, 1.5608},
|
||||
{1.0208,-0.0209, 0.0000,-0.0923, 1.2017,-0.1093,-0.0020,-0.1290, 1.1310},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.2606,-0.2125,-0.0482,-0.0567, 1.1441,-0.0874,-0.0431,-0.3490, 1.3921}}},
|
||||
{0x73, /* PM-A970 */
|
||||
{{1.0828,-0.0739,-0.0089,-0.0895, 1.1597,-0.0702,-0.0531,-0.4291, 1.4822},
|
||||
{1.0258,-0.0306, 0.0048,-0.0995, 1.2173,-0.1178,-0.0054,-0.1242, 1.1296},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.2579,-0.2384,-0.0195,-0.0569, 1.1454,-0.0884,-0.0411,-0.3072, 1.3483}}},
|
||||
{0x75, /* PM-T990 */
|
||||
{{1.0828,-0.0739,-0.0089,-0.0895, 1.1597,-0.0702,-0.0531,-0.4291, 1.4822},
|
||||
{1.0258,-0.0306, 0.0048,-0.0995, 1.2173,-0.1178,-0.0054,-0.1242, 1.1296},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.2579,-0.2384,-0.0195,-0.0569, 1.1454,-0.0884,-0.0411,-0.3072, 1.3483}}},
|
||||
{0x77, /* Stylus CX4900/CX5000/DX5000 */
|
||||
{{0.9716, 0.0927,-0.0643, 0.0010, 1.1068,-0.1078, 0.0101,-0.3046, 1.2945},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x78, /* LP-M5600 */
|
||||
{{1.0784,-0.0560,-0.0224,-0.1793, 1.2234,-0.0441,-0.0041,-0.2636, 1.2677},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x79, /* AcuLaser CX21 */
|
||||
{{1.0614,-0.0361,-0.0253,-0.1081, 1.1320,-0.0240,-0.0536,-0.2045, 1.2580},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x7A, /* GT-F670, Perfection V200 */
|
||||
{{1.1754,-0.1173,-0.0580,-0.0687, 1.1307,-0.0620,-0.0255,-0.4699, 1.4954},
|
||||
{1.0150,-0.0173, 0.0022,-0.0853, 1.2238,-0.1384,-0.0073,-0.1490, 1.1562},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.4283,-0.4335, 0.0052,-0.0170, 1.1308,-0.1138,-0.0147,-0.2230, 1.2377}}},
|
||||
{0x7C, /* GT-X770, Perfection V500 */
|
||||
{{1.2470,-0.2041,-0.0429,-0.1920, 1.2918,-0.0998,-0.0100,-0.2503, 1.2603},
|
||||
{1.0050,-0.0076, 0.0026,-0.2532, 1.1289, 0.1243,-0.0733,-0.0960, 1.1693},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.4724,-0.4599,-0.0125,-0.0876, 1.1562,-0.0686,-0.0097,-0.2278, 1.2375}}},
|
||||
{0x7E, /* Stylus CX4300/CX4400/CX5500/CX5600/DX4400 */
|
||||
{{0.9828, 0.0924,-0.0752, 0.0255, 1.1510,-0.1765, 0.0049,-0.3250, 1.3201},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x7F, /* PX-A640, Stylus CX7300/CX7400/DX7400 */
|
||||
{{1.0936,-0.0142,-0.0795,-0.0001, 1.0951,-0.0949, 0.0308,-0.2967, 1.2659},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x80, /* PX-A740, Stylus CX8300/CX8400/DX8400 */
|
||||
{{1.0936,-0.0142,-0.0795,-0.0001, 1.0951,-0.0949, 0.0308,-0.2967, 1.2659},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x81, /* PX-FA700, Stylus CX9300F/CX9400Fax/DX9400F */
|
||||
{{1.1090,-0.0304,-0.0786, 0.0194, 1.1078,-0.1272,-0.0077,-0.1293, 1.1370},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x82, /* PM-T960 */
|
||||
{{1.1622,-0.1102,-0.0519,-0.0717, 1.1060,-0.0343,-0.0248,-0.4138, 1.4385},
|
||||
{0.9913, 0.0082, 0.0005,-0.1259, 1.0452, 0.0807,-0.0072,-0.0767, 1.0839},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.3900,-0.3008,-0.0892,-0.0254, 1.0890,-0.0636,-0.0300,-0.2501, 1.2801}}},
|
||||
{0x84, /* PM-A940, Stylus Photo RX680/RX685/RX690 */
|
||||
{{1.0934,-0.0042,-0.0892, 0.0052, 1.1019,-0.1071, 0.0259,-0.2651, 1.2392},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x85, /* PM-A840/A840S, Stylus Photo RX585/RX595/RX610 */
|
||||
{{1.0534, 0.0399,-0.0934, 0.0098, 1.0589,-0.0687, 0.0016,-0.1131, 1.1115},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x86, /* GT-D1000, GT-1500 */
|
||||
{{1.1945,-0.1413,-0.0532,-0.1929, 1.2525,-0.0596,-0.0235,-0.2761, 1.2996},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x87, /* GT-X970 */
|
||||
{{1.1978,-0.1417,-0.0561,-0.0852, 1.1610,-0.0758,-0.0395,-0.3212, 1.3607},
|
||||
{1.0000, 0.0009,-0.0009,-0.1268, 1.0523, 0.0745,-0.0075,-0.0873, 1.0948},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.4475,-0.3957,-0.0518,-0.0138, 1.0644,-0.0506,-0.0199,-0.2050, 1.2249}}},
|
||||
{0x97, /* LP-M5000 */
|
||||
{{1.1115,-0.0377,-0.0738,-0.0658, 1.0624, 0.0034, 0.0042,-0.2883, 1.2841},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x89, /* LP-M6000 */
|
||||
{{1.1115,-0.0377,-0.0738,-0.0658, 1.0624, 0.0034, 0.0042,-0.2883, 1.2841},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x8A, /* ES-H7200, GT-20000 */
|
||||
{{1.1221,-0.0396,-0.0825,-0.0718, 1.0822,-0.0104, 0.0112,-0.2995, 1.2883},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x8B, /* GT-F720/S620, Perfection V30/V300 */
|
||||
{{1.2402,-0.1891,-0.0511,-0.1535, 1.2008,-0.0473,-0.0316,-0.3293, 1.3609},
|
||||
{1.0027,-0.0048, 0.0021,-0.2067, 1.0878, 0.1189,-0.0408,-0.0767, 1.1175},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.4524,-0.4346,-0.0178,-0.0601, 1.1273,-0.0672,-0.0173,-0.1823, 1.1996}}},
|
||||
{0x8D, /* Stylus NX200/SX200/TX200 */
|
||||
{{1.0936,-0.0142,-0.0795,-0.0001, 1.0951,-0.0949, 0.0308,-0.2967, 1.2659},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x8E, /* PX-501A, Stylus NX400/SX400/TX400 */
|
||||
{{1.0936,-0.0142,-0.0795,-0.0001, 1.0951,-0.0949, 0.0308,-0.2967, 1.2659},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x8F, /* Stylus NX300 / Stylus Office BX300F/TX300F / ME Office 600F */
|
||||
{{1.1090,-0.0304,-0.0786, 0.0194, 1.1078,-0.1272,-0.0077,-0.1293, 1.1370},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x90, /* PX-601F, Stylus SX600FW/TX600FW / Stylus Office BX600FW / WorkForce 600 */
|
||||
{{1.0316, 0.0864,-0.1180, 0.0268, 1.1111,-0.1379, 0.0213,-0.2235, 1.2022},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x91, /* EP-901A/901F, Artisan 800 / Stylus Photo PX800FW/FX800FW */
|
||||
{{1.0777, 0.0152,-0.0929, 0.0244, 1.1221,-0.1465, 0.0103,-0.1544, 1.1441},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x92, /* EP-801A, Artisan 700 / Stylus Photo PX700W/TX700W */
|
||||
{{1.0777, 0.0152,-0.0929, 0.0244, 1.1221,-0.1465, 0.0103,-0.1544, 1.1441},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x93, /* PX-401A, Stylus NX100/SX100/TX100 / ME 300 */
|
||||
{{1.0934,-0.0042,-0.0892, 0.0052, 1.1019,-0.1071, 0.0259,-0.2651, 1.2392},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
{0x96, /* WorkForce 500 */
|
||||
{{1.1090,-0.0304,-0.0786, 0.0194, 1.1078,-0.1272,-0.0077,-0.1293, 1.1370},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
|
||||
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
|
||||
|
||||
{ 0xFF, { } } /* terminator */
|
||||
};
|
||||
|
||||
const struct epson_profile_map epson_cct_models[] = {
|
||||
{"GT-10000", 0x05 },
|
||||
{"ES-6000", 0x05 },
|
||||
{"Perfection610", 0x06 },
|
||||
{"GT-6600", 0x06A },
|
||||
{"Perfection1200", 0x07 },
|
||||
{"GT-7600", 0x07 },
|
||||
{"Expression1600", 0x0D },
|
||||
{"ES-2000", 0x0D },
|
||||
{"Expression1640XL", 0x0F },
|
||||
{"ES-8500", 0x0F },
|
||||
{"Perfection640", 0x15 },
|
||||
{"GT-6700", 0x15 },
|
||||
{"Perfection1640", 0x16 },
|
||||
{"GT-8700", 0x16 },
|
||||
{"Perfection1240", 0x18 },
|
||||
{"GT-7700", 0x18 },
|
||||
{"GT-30000", 0x1A },
|
||||
{"ES-9000H", 0x1A },
|
||||
{"Expression1680", 0x1B },
|
||||
{"ES-2200", 0x1B },
|
||||
{"GT-7200", 0x1D },
|
||||
{"GT-8200", 0x1F },
|
||||
{"GT-9700", 0x21 },
|
||||
{"GT-7300", 0x23 },
|
||||
{"GT-8300", 0x25 },
|
||||
{"GT-9300", 0x27 },
|
||||
{"GT-9800", 0x29 },
|
||||
{"ES-7000H", 0x2B },
|
||||
{"LP-A500", 0x51 },
|
||||
{"AL-CX11", 0x51 },
|
||||
{"GT-9400", 0x32 },
|
||||
{"CC-600PX", 0x2D },
|
||||
{"PM-A850", 0x3A },
|
||||
{"CX5400", 0x36 },
|
||||
{"GT-X700", 0x34 },
|
||||
{"RX500", 0x38 },
|
||||
{"PX-A650", 0x37 },
|
||||
{"ES-10000G", 0x3F },
|
||||
{"Expression10000", 0x3F },
|
||||
{"CX4600", 0x46 },
|
||||
{"CX6600", 0x49 },
|
||||
{"CX3600", 0x46 },
|
||||
{"RX420", 0x48 },
|
||||
{"PM-A700", 0x48 },
|
||||
{"PM-A870", 0x4B },
|
||||
{"GT-F500", 0x41 },
|
||||
{"GT-F600", 0x43 },
|
||||
{"PM-A900", 0x4D },
|
||||
{"GT-X800", 0x4F },
|
||||
{"GT-X750", 0x54 },
|
||||
{"LP-M5500", 0x56 },
|
||||
{"LP-M5600", 0x78 },
|
||||
{"GT-F520", 0x52 },
|
||||
{"CX3800", 0x57 },
|
||||
{"CX7800", 0x5B },
|
||||
{"PM-A750", 0x5D },
|
||||
{"CX4800", 0x58 },
|
||||
{"CX4200", 0x59 },
|
||||
{"PM-A950", 0x61 },
|
||||
{"PM-A890", 0x5F },
|
||||
{"GT-X900", 0x63 },
|
||||
{"CX4000", 0x6B },
|
||||
{"CX3000v", 0x6A },
|
||||
{"ES-H300", 0x65 },
|
||||
{"CX6000", 0x6C },
|
||||
{"PM-A820", 0x70 },
|
||||
{"PM-A920", 0x71 },
|
||||
{"PM-A970", 0x73 },
|
||||
{"PM-T990", 0x75 },
|
||||
{"CX5000", 0x77 },
|
||||
{"GT-S600", 0x66 },
|
||||
{"GT-F700", 0x68 },
|
||||
{"AL-CX21", 0x79 },
|
||||
{"GT-F670", 0x7A },
|
||||
{"GT-X770", 0x7C },
|
||||
{"CX4400", 0x7E },
|
||||
{"CX7400", 0x7F },
|
||||
{"CX8400", 0x80 },
|
||||
{"CX9400Fax", 0x81 },
|
||||
{"PM-T960", 0x82 },
|
||||
{"PM-A940", 0x84 },
|
||||
{"PM-A840", 0x85 },
|
||||
{"GT-D1000", 0x86 },
|
||||
{"GT-X970", 0x87 },
|
||||
{"LP-M5000", 0x97 },
|
||||
{"LP-M6000", 0x89 },
|
||||
{"ES-H7200", 0x8A },
|
||||
{"GT-20000", 0x8A },
|
||||
{"NX200", 0x8D },
|
||||
{"NX400", 0x8E },
|
||||
{"NX100", 0x93 },
|
||||
{"NX300", 0x8F },
|
||||
{"WorkForce 600", 0x90 },
|
||||
{"Artisan 800", 0x91 },
|
||||
{"Artisan 700", 0x92 },
|
||||
{"WorkForce 500", 0x96 },
|
||||
{"GT-F720", 0x8B },
|
||||
{"GT-S620", 0x8B },
|
||||
{"GT-S50", 0x00 },
|
||||
{"GT-S80", 0x00 },
|
||||
{"PID 0851", 0x98 },
|
||||
{"PID 084D", 0x99 },
|
||||
{"PID 084F", 0x9A },
|
||||
{"PID 0854", 0x9B },
|
||||
{"PID 0856", 0x9C },
|
||||
|
||||
{ } /* terminator */
|
||||
};
|
|
@ -20,6 +20,7 @@
|
|||
#include "sane/config.h"
|
||||
|
||||
#include <byteorder.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "epson2.h"
|
||||
#include "epson2-io.h"
|
||||
|
@ -125,17 +126,158 @@ esci_set_scan_area(Epson_Scanner * s, int x, int y, int width, int height)
|
|||
return e2_cmd_simple(s, params, 8);
|
||||
}
|
||||
|
||||
static int
|
||||
get_roundup_index(double frac[], int n)
|
||||
{
|
||||
int i, index = -1;
|
||||
double max_val = 0.0;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
|
||||
if (frac[i] < 0)
|
||||
continue;
|
||||
|
||||
if (max_val < frac[i]) {
|
||||
index = i;
|
||||
max_val = frac[i];
|
||||
}
|
||||
}
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
static int
|
||||
get_rounddown_index(double frac[], int n)
|
||||
{
|
||||
int i, index = -1;
|
||||
double min_val = 1.0;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
|
||||
if (frac[i] > 0)
|
||||
continue;
|
||||
|
||||
if (min_val > frac[i]) {
|
||||
index = i;
|
||||
min_val = frac[i];
|
||||
}
|
||||
}
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
static unsigned char
|
||||
int2cpt(int val)
|
||||
{
|
||||
if (val >= 0) {
|
||||
|
||||
if (val > 127)
|
||||
val = 127;
|
||||
|
||||
return (unsigned char) val;
|
||||
|
||||
} else {
|
||||
|
||||
val = -val;
|
||||
|
||||
if (val > 127)
|
||||
val = 127;
|
||||
|
||||
return (unsigned char) (0x80 | val);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
round_cct(double org_cct[], int rnd_cct[])
|
||||
{
|
||||
int loop = 0;
|
||||
int i, j, sum[3];
|
||||
double mult_cct[9], frac[9];
|
||||
|
||||
for (i = 0; i < 9; i++) {
|
||||
mult_cct[i] = org_cct[i] * 32;
|
||||
rnd_cct[i] = (int) floor(mult_cct[i] + 0.5);
|
||||
}
|
||||
|
||||
do {
|
||||
for (i = 0; i < 3; i++) {
|
||||
|
||||
int k = i * 3;
|
||||
|
||||
if ((rnd_cct[k] == 11) &&
|
||||
(rnd_cct[k] == rnd_cct[k + 1]) &&
|
||||
(rnd_cct[k] == rnd_cct[k + 2])) {
|
||||
|
||||
rnd_cct[k + i]--;
|
||||
mult_cct[k + i] = rnd_cct[k + i];
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
|
||||
int k = i * 3;
|
||||
|
||||
for (sum[i] = j = 0; j < 3; j++)
|
||||
sum[i] += rnd_cct[k + j];
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; i++)
|
||||
frac[i] = mult_cct[i] - rnd_cct[i];
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
|
||||
int k = i * 3;
|
||||
|
||||
if (sum[i] < 32) {
|
||||
|
||||
int index = get_roundup_index(&frac[k], 3);
|
||||
if (index != -1) {
|
||||
rnd_cct[k + index]++;
|
||||
mult_cct[k + index] = rnd_cct[k + index];
|
||||
sum[i]++;
|
||||
}
|
||||
|
||||
} else if (sum[i] > 32) {
|
||||
|
||||
int index = get_rounddown_index(&frac[k], 3);
|
||||
if (index != -1) {
|
||||
rnd_cct[k + index]--;
|
||||
mult_cct[k + index] = rnd_cct[k + index];
|
||||
sum[i]--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
while ((++loop < 2)
|
||||
&& ((sum[0] != 32) || (sum[1] != 32) || (sum[2] != 32)));
|
||||
}
|
||||
|
||||
static void
|
||||
profile_to_colorcoeff(double *profile, unsigned char *color_coeff)
|
||||
{
|
||||
int cc_idx[] = { 4, 1, 7, 3, 0, 6, 5, 2, 8 };
|
||||
int i, color_table[9];
|
||||
|
||||
round_cct(profile, color_table);
|
||||
|
||||
for (i = 0; i < 9; i++)
|
||||
color_coeff[i] = int2cpt(color_table[cc_idx[i]]);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Sends the "set color correction coefficients" command with the
|
||||
* currently selected parameters to the scanner.
|
||||
*/
|
||||
|
||||
SANE_Status
|
||||
esci_set_color_correction_coefficients(Epson_Scanner * s)
|
||||
esci_set_color_correction_coefficients(Epson_Scanner * s, SANE_Word *table)
|
||||
{
|
||||
SANE_Status status;
|
||||
unsigned char params[2];
|
||||
signed char cct[9];
|
||||
unsigned char data[9];
|
||||
double cct[9];
|
||||
|
||||
DBG(8, "%s\n", __func__);
|
||||
if (!s->hw->cmd->set_color_correction_coefficients) {
|
||||
|
@ -150,21 +292,23 @@ esci_set_color_correction_coefficients(Epson_Scanner * s)
|
|||
if (status != SANE_STATUS_GOOD)
|
||||
return status;
|
||||
|
||||
cct[0] = s->val[OPT_CCT_1].w;
|
||||
cct[1] = s->val[OPT_CCT_2].w;
|
||||
cct[2] = s->val[OPT_CCT_3].w;
|
||||
cct[3] = s->val[OPT_CCT_4].w;
|
||||
cct[4] = s->val[OPT_CCT_5].w;
|
||||
cct[5] = s->val[OPT_CCT_6].w;
|
||||
cct[6] = s->val[OPT_CCT_7].w;
|
||||
cct[7] = s->val[OPT_CCT_8].w;
|
||||
cct[8] = s->val[OPT_CCT_9].w;
|
||||
cct[0] = SANE_UNFIX(table[0]);
|
||||
cct[1] = SANE_UNFIX(table[1]);
|
||||
cct[2] = SANE_UNFIX(table[2]);
|
||||
cct[3] = SANE_UNFIX(table[3]);
|
||||
cct[4] = SANE_UNFIX(table[4]);
|
||||
cct[5] = SANE_UNFIX(table[5]);
|
||||
cct[6] = SANE_UNFIX(table[6]);
|
||||
cct[7] = SANE_UNFIX(table[7]);
|
||||
cct[8] = SANE_UNFIX(table[8]);
|
||||
|
||||
profile_to_colorcoeff(cct, data);
|
||||
|
||||
DBG(11, "%s: %d,%d,%d %d,%d,%d %d,%d,%d\n", __func__,
|
||||
cct[0], cct[1], cct[2], cct[3],
|
||||
cct[4], cct[5], cct[6], cct[7], cct[8]);
|
||||
data[0] , data[1], data[2], data[3],
|
||||
data[4], data[5], data[6], data[7], data[8]);
|
||||
|
||||
return e2_cmd_simple(s, params, 9);
|
||||
return e2_cmd_simple(s, data, 9);
|
||||
}
|
||||
|
||||
SANE_Status
|
||||
|
|
|
@ -39,7 +39,7 @@ SANE_Status esci_set_zoom(Epson_Scanner * s, unsigned char x, unsigned char y);
|
|||
SANE_Status esci_set_resolution(Epson_Scanner * s, int x, int y);
|
||||
SANE_Status esci_set_scan_area(Epson_Scanner * s, int x, int y, int width,
|
||||
int height);
|
||||
SANE_Status esci_set_color_correction_coefficients(Epson_Scanner * s);
|
||||
SANE_Status esci_set_color_correction_coefficients(Epson_Scanner * s, SANE_Word *table);
|
||||
SANE_Status esci_set_gamma_table(Epson_Scanner * s);
|
||||
|
||||
SANE_Status esci_request_status(SANE_Handle handle, unsigned char *scanner_status);
|
||||
|
|
|
@ -128,17 +128,15 @@ static const int dropout_params[] = {
|
|||
* and one array to mark the user defined color correction (color_userdefined[]).
|
||||
*/
|
||||
static const int color_params[] = {
|
||||
0x00,
|
||||
0x01,
|
||||
0x00, /* None */
|
||||
0x01, /* Auto */
|
||||
0x01, /* User defined */
|
||||
0x10,
|
||||
0x20,
|
||||
0x40,
|
||||
0x80
|
||||
};
|
||||
|
||||
static const SANE_Range outline_emphasis_range = { -2, 2, 0 };
|
||||
|
||||
|
||||
void
|
||||
e2_dev_init(Epson_Device *dev, const char *devname, int conntype)
|
||||
{
|
||||
|
@ -146,6 +144,8 @@ e2_dev_init(Epson_Device *dev, const char *devname, int conntype)
|
|||
dev->model = NULL;
|
||||
dev->connection = conntype;
|
||||
|
||||
dev->model_id = 0;
|
||||
|
||||
dev->sane.name = devname;
|
||||
dev->sane.model = NULL;
|
||||
|
||||
|
@ -160,6 +160,8 @@ e2_dev_init(Epson_Device *dev, const char *devname, int conntype)
|
|||
dev->need_color_reorder = SANE_FALSE;
|
||||
dev->need_double_vertical = SANE_FALSE;
|
||||
|
||||
dev->cct_profile = &epson_cct_profiles[0]; /* default profile */
|
||||
|
||||
dev->cmd = &epson_cmd[EPSON_LEVEL_DEFAULT];
|
||||
|
||||
/* Change default level when using a network connection */
|
||||
|
@ -176,6 +178,26 @@ e2_dev_init(Epson_Device *dev, const char *devname, int conntype)
|
|||
SANE_Status
|
||||
e2_dev_post_init(struct Epson_Device *dev)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* find cct model id */
|
||||
for (i = 0; epson_cct_models[i].name != NULL; i++) {
|
||||
if (strcmp(epson_cct_models[i].name, dev->model) == 0) {
|
||||
dev->model_id = epson_cct_models[i].id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* find cct profile */
|
||||
for (i = 0; epson_cct_profiles[i].model != 0xFF; i++) {
|
||||
if (epson_cct_profiles[i].model == dev->model_id) {
|
||||
dev->cct_profile = &epson_cct_profiles[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DBG(1, "CCT model id is 0x%02x, profile offset %d\n", dev->model_id, i);
|
||||
|
||||
/* If we have been unable to obtain supported resolutions
|
||||
* due to the fact we are on the network transport,
|
||||
* add some convenient ones
|
||||
|
|
263
backend/epson2.c
263
backend/epson2.c
|
@ -197,6 +197,7 @@ static const SANE_String_Const dropout_list[] = {
|
|||
static const SANE_Bool color_userdefined[] = {
|
||||
SANE_FALSE,
|
||||
SANE_TRUE,
|
||||
SANE_TRUE,
|
||||
SANE_FALSE,
|
||||
SANE_FALSE,
|
||||
SANE_FALSE,
|
||||
|
@ -204,7 +205,8 @@ static const SANE_Bool color_userdefined[] = {
|
|||
};
|
||||
|
||||
static const SANE_String_Const color_list[] = {
|
||||
SANE_I18N("No Correction"),
|
||||
SANE_I18N("None"),
|
||||
SANE_I18N("Automatic"),
|
||||
SANE_I18N("User defined"),
|
||||
SANE_I18N("Impact-dot printers"),
|
||||
SANE_I18N("Thermal printers"),
|
||||
|
@ -213,6 +215,21 @@ static const SANE_String_Const color_list[] = {
|
|||
NULL
|
||||
};
|
||||
|
||||
/* cct profile has precedence over normal color correction */
|
||||
static const SANE_String_Const cct_mode_list[] = {
|
||||
"Automatic",
|
||||
"Reflective",
|
||||
"Colour negatives",
|
||||
"Monochrome negatives",
|
||||
"Colour positives",
|
||||
NULL
|
||||
};
|
||||
|
||||
enum {
|
||||
CCT_AUTO, CCT_REFLECTIVE, CCT_COLORNEG, CCT_MONONEG,
|
||||
CCT_COLORPOS
|
||||
};
|
||||
|
||||
/*
|
||||
* Gamma correction:
|
||||
* The A and B level scanners work differently than the D level scanners,
|
||||
|
@ -282,6 +299,7 @@ static const SANE_String_Const bay_list[] = {
|
|||
/* minimum, maximum, quantization */
|
||||
static const SANE_Range u8_range = { 0, 255, 0 };
|
||||
static const SANE_Range s8_range = { -127, 127, 0 };
|
||||
static const SANE_Range fx_range = { SANE_FIX(-2.0), SANE_FIX(2.0), 0 };
|
||||
|
||||
static const SANE_Range outline_emphasis_range = { -2, 2, 0 };
|
||||
|
||||
|
@ -924,7 +942,7 @@ init_options(Epson_Scanner *s)
|
|||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < NUM_OPTIONS; ++i) {
|
||||
for (i = 0; i < NUM_OPTIONS; i++) {
|
||||
s->opt[i].size = sizeof(SANE_Word);
|
||||
s->opt[i].cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT;
|
||||
}
|
||||
|
@ -1134,16 +1152,14 @@ init_options(Epson_Scanner *s)
|
|||
s->opt[OPT_COLOR_CORRECTION].name = "color-correction";
|
||||
s->opt[OPT_COLOR_CORRECTION].title = SANE_I18N("Color correction");
|
||||
s->opt[OPT_COLOR_CORRECTION].desc =
|
||||
SANE_I18N
|
||||
("Sets the color correction table for the selected output device.");
|
||||
SANE_I18N("Sets the color correction table for the selected output device.");
|
||||
|
||||
s->opt[OPT_COLOR_CORRECTION].type = SANE_TYPE_STRING;
|
||||
s->opt[OPT_COLOR_CORRECTION].size = 32;
|
||||
s->opt[OPT_COLOR_CORRECTION].size = max_string_size(color_list);
|
||||
s->opt[OPT_COLOR_CORRECTION].cap |= SANE_CAP_ADVANCED;
|
||||
s->opt[OPT_COLOR_CORRECTION].constraint_type =
|
||||
SANE_CONSTRAINT_STRING_LIST;
|
||||
s->opt[OPT_COLOR_CORRECTION].constraint_type = SANE_CONSTRAINT_STRING_LIST;
|
||||
s->opt[OPT_COLOR_CORRECTION].constraint.string_list = color_list;
|
||||
s->val[OPT_COLOR_CORRECTION].w = 5; /* scanner default: CRT monitors */
|
||||
s->val[OPT_COLOR_CORRECTION].w = 0;
|
||||
|
||||
if (!s->hw->cmd->set_color_correction)
|
||||
s->opt[OPT_COLOR_CORRECTION].cap |= SANE_CAP_INACTIVE;
|
||||
|
@ -1173,25 +1189,7 @@ init_options(Epson_Scanner *s)
|
|||
if (!s->hw->cmd->set_threshold)
|
||||
s->opt[OPT_THRESHOLD].cap |= SANE_CAP_INACTIVE;
|
||||
|
||||
s->opt[OPT_CCT_GROUP].title =
|
||||
SANE_I18N("Color correction coefficients");
|
||||
s->opt[OPT_CCT_GROUP].desc =
|
||||
SANE_I18N("Matrix multiplication of RGB");
|
||||
s->opt[OPT_CCT_GROUP].type = SANE_TYPE_GROUP;
|
||||
s->opt[OPT_CCT_GROUP].cap = SANE_CAP_ADVANCED;
|
||||
|
||||
|
||||
/* color correction coefficients */
|
||||
s->opt[OPT_CCT_1].name = "cct-1";
|
||||
s->opt[OPT_CCT_2].name = "cct-2";
|
||||
s->opt[OPT_CCT_3].name = "cct-3";
|
||||
s->opt[OPT_CCT_4].name = "cct-4";
|
||||
s->opt[OPT_CCT_5].name = "cct-5";
|
||||
s->opt[OPT_CCT_6].name = "cct-6";
|
||||
s->opt[OPT_CCT_7].name = "cct-7";
|
||||
s->opt[OPT_CCT_8].name = "cct-8";
|
||||
s->opt[OPT_CCT_9].name = "cct-9";
|
||||
|
||||
/*
|
||||
s->opt[OPT_CCT_1].title = SANE_I18N("Green");
|
||||
s->opt[OPT_CCT_2].title = SANE_I18N("Shift green to red");
|
||||
s->opt[OPT_CCT_3].title = SANE_I18N("Shift green to blue");
|
||||
|
@ -1215,72 +1213,44 @@ init_options(Epson_Scanner *s)
|
|||
SANE_I18N("Adds to green based on blue level");
|
||||
s->opt[OPT_CCT_8].desc = SANE_I18N("Adds to red based on blue level");
|
||||
s->opt[OPT_CCT_9].desc = SANE_I18N("Controls blue level");
|
||||
|
||||
s->opt[OPT_CCT_1].type = SANE_TYPE_INT;
|
||||
s->opt[OPT_CCT_2].type = SANE_TYPE_INT;
|
||||
s->opt[OPT_CCT_3].type = SANE_TYPE_INT;
|
||||
s->opt[OPT_CCT_4].type = SANE_TYPE_INT;
|
||||
s->opt[OPT_CCT_5].type = SANE_TYPE_INT;
|
||||
s->opt[OPT_CCT_6].type = SANE_TYPE_INT;
|
||||
s->opt[OPT_CCT_7].type = SANE_TYPE_INT;
|
||||
s->opt[OPT_CCT_8].type = SANE_TYPE_INT;
|
||||
s->opt[OPT_CCT_9].type = SANE_TYPE_INT;
|
||||
|
||||
s->opt[OPT_CCT_1].cap |= SANE_CAP_ADVANCED | SANE_CAP_INACTIVE;
|
||||
s->opt[OPT_CCT_2].cap |= SANE_CAP_ADVANCED | SANE_CAP_INACTIVE;
|
||||
s->opt[OPT_CCT_3].cap |= SANE_CAP_ADVANCED | SANE_CAP_INACTIVE;
|
||||
s->opt[OPT_CCT_4].cap |= SANE_CAP_ADVANCED | SANE_CAP_INACTIVE;
|
||||
s->opt[OPT_CCT_5].cap |= SANE_CAP_ADVANCED | SANE_CAP_INACTIVE;
|
||||
s->opt[OPT_CCT_6].cap |= SANE_CAP_ADVANCED | SANE_CAP_INACTIVE;
|
||||
s->opt[OPT_CCT_7].cap |= SANE_CAP_ADVANCED | SANE_CAP_INACTIVE;
|
||||
s->opt[OPT_CCT_8].cap |= SANE_CAP_ADVANCED | SANE_CAP_INACTIVE;
|
||||
s->opt[OPT_CCT_9].cap |= SANE_CAP_ADVANCED | SANE_CAP_INACTIVE;
|
||||
|
||||
s->opt[OPT_CCT_1].unit = SANE_UNIT_NONE;
|
||||
s->opt[OPT_CCT_2].unit = SANE_UNIT_NONE;
|
||||
s->opt[OPT_CCT_3].unit = SANE_UNIT_NONE;
|
||||
s->opt[OPT_CCT_4].unit = SANE_UNIT_NONE;
|
||||
s->opt[OPT_CCT_5].unit = SANE_UNIT_NONE;
|
||||
s->opt[OPT_CCT_6].unit = SANE_UNIT_NONE;
|
||||
s->opt[OPT_CCT_7].unit = SANE_UNIT_NONE;
|
||||
s->opt[OPT_CCT_8].unit = SANE_UNIT_NONE;
|
||||
s->opt[OPT_CCT_9].unit = SANE_UNIT_NONE;
|
||||
|
||||
s->opt[OPT_CCT_1].constraint_type = SANE_CONSTRAINT_RANGE;
|
||||
s->opt[OPT_CCT_2].constraint_type = SANE_CONSTRAINT_RANGE;
|
||||
s->opt[OPT_CCT_3].constraint_type = SANE_CONSTRAINT_RANGE;
|
||||
s->opt[OPT_CCT_4].constraint_type = SANE_CONSTRAINT_RANGE;
|
||||
s->opt[OPT_CCT_5].constraint_type = SANE_CONSTRAINT_RANGE;
|
||||
s->opt[OPT_CCT_6].constraint_type = SANE_CONSTRAINT_RANGE;
|
||||
s->opt[OPT_CCT_7].constraint_type = SANE_CONSTRAINT_RANGE;
|
||||
s->opt[OPT_CCT_8].constraint_type = SANE_CONSTRAINT_RANGE;
|
||||
s->opt[OPT_CCT_9].constraint_type = SANE_CONSTRAINT_RANGE;
|
||||
|
||||
s->opt[OPT_CCT_1].constraint.range = &s8_range;
|
||||
s->opt[OPT_CCT_2].constraint.range = &s8_range;
|
||||
s->opt[OPT_CCT_3].constraint.range = &s8_range;
|
||||
s->opt[OPT_CCT_4].constraint.range = &s8_range;
|
||||
s->opt[OPT_CCT_5].constraint.range = &s8_range;
|
||||
s->opt[OPT_CCT_6].constraint.range = &s8_range;
|
||||
s->opt[OPT_CCT_7].constraint.range = &s8_range;
|
||||
s->opt[OPT_CCT_8].constraint.range = &s8_range;
|
||||
s->opt[OPT_CCT_9].constraint.range = &s8_range;
|
||||
|
||||
s->val[OPT_CCT_1].w = 32;
|
||||
s->val[OPT_CCT_2].w = 0;
|
||||
s->val[OPT_CCT_3].w = 0;
|
||||
s->val[OPT_CCT_4].w = 0;
|
||||
s->val[OPT_CCT_5].w = 32;
|
||||
s->val[OPT_CCT_6].w = 0;
|
||||
s->val[OPT_CCT_7].w = 0;
|
||||
s->val[OPT_CCT_8].w = 0;
|
||||
s->val[OPT_CCT_9].w = 32;
|
||||
*/
|
||||
|
||||
/* "Advanced" group: */
|
||||
s->opt[OPT_ADVANCED_GROUP].title = SANE_I18N("Advanced");
|
||||
s->opt[OPT_ADVANCED_GROUP].desc = "";
|
||||
s->opt[OPT_ADVANCED_GROUP].type = SANE_TYPE_GROUP;
|
||||
s->opt[OPT_ADVANCED_GROUP].cap = SANE_CAP_ADVANCED;
|
||||
s->opt[OPT_ADVANCED_GROUP].cap |= SANE_CAP_ADVANCED;
|
||||
|
||||
/* "Color correction" group: */
|
||||
s->opt[OPT_CCT_GROUP].title = SANE_I18N("Color correction");
|
||||
s->opt[OPT_CCT_GROUP].desc = "";
|
||||
s->opt[OPT_CCT_GROUP].type = SANE_TYPE_GROUP;
|
||||
s->opt[OPT_CCT_GROUP].cap |= SANE_CAP_ADVANCED;
|
||||
|
||||
s->opt[OPT_CCT_MODE].name = "cct-mode";
|
||||
s->opt[OPT_CCT_MODE].title = "CCT Mode";
|
||||
s->opt[OPT_CCT_MODE].desc = "Color correction profile mode";
|
||||
s->opt[OPT_CCT_MODE].type = SANE_TYPE_STRING;
|
||||
s->opt[OPT_CCT_MODE].cap |= SANE_CAP_ADVANCED;
|
||||
s->opt[OPT_CCT_MODE].size = max_string_size(cct_mode_list);
|
||||
s->opt[OPT_CCT_MODE].constraint_type = SANE_CONSTRAINT_STRING_LIST;
|
||||
s->opt[OPT_CCT_MODE].constraint.string_list = cct_mode_list;
|
||||
s->val[OPT_CCT_MODE].w = CCT_AUTO;
|
||||
|
||||
s->opt[OPT_CCT_PROFILE].name = "cct-profile";
|
||||
s->opt[OPT_CCT_PROFILE].title = "CCT Profile";
|
||||
s->opt[OPT_CCT_PROFILE].desc = "Color correction profile data";
|
||||
s->opt[OPT_CCT_PROFILE].type = SANE_TYPE_FIXED;
|
||||
s->opt[OPT_CCT_PROFILE].cap |= SANE_CAP_ADVANCED;
|
||||
s->opt[OPT_CCT_PROFILE].unit = SANE_UNIT_NONE;
|
||||
s->opt[OPT_CCT_PROFILE].constraint_type = SANE_CONSTRAINT_RANGE;
|
||||
s->opt[OPT_CCT_PROFILE].constraint.range = &fx_range;
|
||||
s->opt[OPT_CCT_PROFILE].size = 9 * sizeof(SANE_Word);
|
||||
s->val[OPT_CCT_PROFILE].wa = s->cct_table;
|
||||
|
||||
/* if (!s->hw->cmd->set_color_correction)
|
||||
s->opt[OPT_FILM_TYPE].cap |= SANE_CAP_INACTIVE;
|
||||
*/
|
||||
|
||||
/* mirror */
|
||||
s->opt[OPT_MIRROR].name = "mirror";
|
||||
|
@ -1663,6 +1633,7 @@ getvalue(SANE_Handle handle, SANE_Int option, void *value)
|
|||
case OPT_GAMMA_VECTOR_R:
|
||||
case OPT_GAMMA_VECTOR_G:
|
||||
case OPT_GAMMA_VECTOR_B:
|
||||
case OPT_CCT_PROFILE:
|
||||
memcpy(value, sval->wa, sopt->size);
|
||||
break;
|
||||
|
||||
|
@ -1678,15 +1649,8 @@ getvalue(SANE_Handle handle, SANE_Int option, void *value)
|
|||
case OPT_BRIGHTNESS:
|
||||
case OPT_SHARPNESS:
|
||||
case OPT_AUTO_EJECT:
|
||||
case OPT_CCT_1:
|
||||
case OPT_CCT_2:
|
||||
case OPT_CCT_3:
|
||||
case OPT_CCT_4:
|
||||
case OPT_CCT_5:
|
||||
case OPT_CCT_6:
|
||||
case OPT_CCT_7:
|
||||
case OPT_CCT_8:
|
||||
case OPT_CCT_9:
|
||||
/* case OPT_CCT_1:
|
||||
*/
|
||||
case OPT_THRESHOLD:
|
||||
case OPT_BIT_DEPTH:
|
||||
case OPT_WAIT_FOR_BUTTON:
|
||||
|
@ -1694,6 +1658,7 @@ getvalue(SANE_Handle handle, SANE_Int option, void *value)
|
|||
break;
|
||||
|
||||
case OPT_MODE:
|
||||
case OPT_CCT_MODE:
|
||||
case OPT_ADF_MODE:
|
||||
case OPT_HALFTONE:
|
||||
case OPT_DROPOUT:
|
||||
|
@ -1865,8 +1830,8 @@ setvalue(SANE_Handle handle, SANE_Int option, void *value, SANE_Int *info)
|
|||
Option_Value *sval = &(s->val[option]);
|
||||
|
||||
SANE_Status status;
|
||||
const SANE_String_Const *optval;
|
||||
int optindex;
|
||||
const SANE_String_Const *optval = NULL;
|
||||
int optindex = 0;
|
||||
SANE_Bool reload = SANE_FALSE;
|
||||
|
||||
DBG(17, "%s: option = %d, value = %p\n", __func__, option, value);
|
||||
|
@ -1880,13 +1845,9 @@ setvalue(SANE_Handle handle, SANE_Int option, void *value, SANE_Int *info)
|
|||
DBG(17, "%s: constrained val = %d\n", __func__,
|
||||
*(SANE_Word *) value);
|
||||
|
||||
optval = NULL;
|
||||
optindex = 0;
|
||||
|
||||
if (sopt->constraint_type == SANE_CONSTRAINT_STRING_LIST) {
|
||||
optval = search_string_list(sopt->constraint.string_list,
|
||||
(char *) value);
|
||||
|
||||
if (optval == NULL)
|
||||
return SANE_STATUS_INVAL;
|
||||
optindex = optval - sopt->constraint.string_list;
|
||||
|
@ -1897,21 +1858,12 @@ setvalue(SANE_Handle handle, SANE_Int option, void *value, SANE_Int *info)
|
|||
case OPT_GAMMA_VECTOR_R:
|
||||
case OPT_GAMMA_VECTOR_G:
|
||||
case OPT_GAMMA_VECTOR_B:
|
||||
case OPT_CCT_PROFILE:
|
||||
memcpy(sval->wa, value, sopt->size); /* Word arrays */
|
||||
break;
|
||||
|
||||
case OPT_CCT_1:
|
||||
case OPT_CCT_2:
|
||||
case OPT_CCT_3:
|
||||
case OPT_CCT_4:
|
||||
case OPT_CCT_5:
|
||||
case OPT_CCT_6:
|
||||
case OPT_CCT_7:
|
||||
case OPT_CCT_8:
|
||||
case OPT_CCT_9:
|
||||
sval->w = *((SANE_Word *) value); /* Simple values */
|
||||
break;
|
||||
|
||||
case OPT_CCT_MODE:
|
||||
case OPT_ADF_MODE:
|
||||
case OPT_DROPOUT:
|
||||
case OPT_FILM_TYPE:
|
||||
case OPT_BAY:
|
||||
|
@ -1954,16 +1906,19 @@ setvalue(SANE_Handle handle, SANE_Int option, void *value, SANE_Int *info)
|
|||
case OPT_MODE:
|
||||
{
|
||||
SANE_Bool isColor = mode_params[optindex].color;
|
||||
SANE_Bool userDefined =
|
||||
/* SANE_Bool userDefined =
|
||||
color_userdefined[s->val[OPT_COLOR_CORRECTION].w];
|
||||
|
||||
SANE_Bool canCCT = isColor && userDefined; */
|
||||
|
||||
sval->w = optindex;
|
||||
|
||||
/* halftoning available only on bw scans */
|
||||
if (s->hw->cmd->set_halftoning != 0)
|
||||
setOptionState(s,
|
||||
mode_params[optindex].depth ==
|
||||
1, OPT_HALFTONE, &reload);
|
||||
setOptionState(s, mode_params[optindex].depth == 1,
|
||||
OPT_HALFTONE, &reload);
|
||||
|
||||
/* disable dropout on non-color scans */
|
||||
setOptionState(s, !isColor, OPT_DROPOUT, &reload);
|
||||
|
||||
if (s->hw->cmd->set_color_correction)
|
||||
|
@ -1971,24 +1926,9 @@ setvalue(SANE_Handle handle, SANE_Int option, void *value, SANE_Int *info)
|
|||
OPT_COLOR_CORRECTION, &reload);
|
||||
|
||||
if (s->hw->cmd->set_color_correction_coefficients) {
|
||||
setOptionState(s, isColor
|
||||
/*XXX setOptionState(s, isColor
|
||||
&& userDefined, OPT_CCT_1, &reload);
|
||||
setOptionState(s, isColor
|
||||
&& userDefined, OPT_CCT_2, &reload);
|
||||
setOptionState(s, isColor
|
||||
&& userDefined, OPT_CCT_3, &reload);
|
||||
setOptionState(s, isColor
|
||||
&& userDefined, OPT_CCT_4, &reload);
|
||||
setOptionState(s, isColor
|
||||
&& userDefined, OPT_CCT_5, &reload);
|
||||
setOptionState(s, isColor
|
||||
&& userDefined, OPT_CCT_6, &reload);
|
||||
setOptionState(s, isColor
|
||||
&& userDefined, OPT_CCT_7, &reload);
|
||||
setOptionState(s, isColor
|
||||
&& userDefined, OPT_CCT_8, &reload);
|
||||
setOptionState(s, isColor
|
||||
&& userDefined, OPT_CCT_9, &reload);
|
||||
*/
|
||||
}
|
||||
|
||||
/* if binary, then disable the bit depth selection */
|
||||
|
@ -2012,10 +1952,6 @@ setvalue(SANE_Handle handle, SANE_Int option, void *value, SANE_Int *info)
|
|||
break;
|
||||
}
|
||||
|
||||
case OPT_ADF_MODE:
|
||||
sval->w = optindex;
|
||||
break;
|
||||
|
||||
case OPT_BIT_DEPTH:
|
||||
sval->w = *((SANE_Word *) value);
|
||||
mode_params[s->val[OPT_MODE].w].depth = sval->w;
|
||||
|
@ -2029,18 +1965,10 @@ setvalue(SANE_Handle handle, SANE_Int option, void *value, SANE_Int *info)
|
|||
|
||||
case OPT_COLOR_CORRECTION:
|
||||
{
|
||||
SANE_Bool f = color_userdefined[optindex];
|
||||
/* SANE_Bool f = color_userdefined[optindex]; */
|
||||
|
||||
sval->w = optindex;
|
||||
setOptionState(s, f, OPT_CCT_1, &reload);
|
||||
setOptionState(s, f, OPT_CCT_2, &reload);
|
||||
setOptionState(s, f, OPT_CCT_3, &reload);
|
||||
setOptionState(s, f, OPT_CCT_4, &reload);
|
||||
setOptionState(s, f, OPT_CCT_5, &reload);
|
||||
setOptionState(s, f, OPT_CCT_6, &reload);
|
||||
setOptionState(s, f, OPT_CCT_7, &reload);
|
||||
setOptionState(s, f, OPT_CCT_8, &reload);
|
||||
setOptionState(s, f, OPT_CCT_9, &reload);
|
||||
/*XXX setOptionState(s, f, OPT_CCT_1, &reload); */
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -2238,6 +2166,19 @@ sane_get_parameters(SANE_Handle handle, SANE_Parameters *params)
|
|||
return SANE_STATUS_GOOD;
|
||||
}
|
||||
|
||||
static void e2_load_cct_profile(struct Epson_Scanner *s, unsigned int index)
|
||||
{
|
||||
s->cct_table[0] = SANE_FIX(s->hw->cct_profile->cct[index][0]);
|
||||
s->cct_table[1] = SANE_FIX(s->hw->cct_profile->cct[index][1]);
|
||||
s->cct_table[2] = SANE_FIX(s->hw->cct_profile->cct[index][2]);
|
||||
s->cct_table[3] = SANE_FIX(s->hw->cct_profile->cct[index][3]);
|
||||
s->cct_table[4] = SANE_FIX(s->hw->cct_profile->cct[index][4]);
|
||||
s->cct_table[5] = SANE_FIX(s->hw->cct_profile->cct[index][5]);
|
||||
s->cct_table[6] = SANE_FIX(s->hw->cct_profile->cct[index][6]);
|
||||
s->cct_table[7] = SANE_FIX(s->hw->cct_profile->cct[index][7]);
|
||||
s->cct_table[8] = SANE_FIX(s->hw->cct_profile->cct[index][8]);
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is part of the SANE API and gets called from the front end to
|
||||
* start the scan process.
|
||||
|
@ -2286,9 +2227,26 @@ sane_start(SANE_Handle handle)
|
|||
return status;
|
||||
}
|
||||
|
||||
|
||||
if (s->val[OPT_COLOR_CORRECTION].w == 1) { /* Automatic */
|
||||
|
||||
if (0) { /* XXX TPU */
|
||||
|
||||
/* XXX check this */
|
||||
if (s->val[OPT_FILM_TYPE].w == 0)
|
||||
e2_load_cct_profile(s, CCTP_COLORPOS);
|
||||
else
|
||||
e2_load_cct_profile(s, CCTP_COLORNEG);
|
||||
|
||||
} else {
|
||||
e2_load_cct_profile(s, CCTP_REFLECTIVE);
|
||||
}
|
||||
}
|
||||
|
||||
/* ESC m, user defined color correction */
|
||||
if (s->val[OPT_COLOR_CORRECTION].w == 1) {
|
||||
status = esci_set_color_correction_coefficients(s);
|
||||
if (color_userdefined[s->val[OPT_COLOR_CORRECTION].w]) {
|
||||
status = esci_set_color_correction_coefficients(s,
|
||||
s->cct_table);
|
||||
if (status != SANE_STATUS_GOOD)
|
||||
return status;
|
||||
}
|
||||
|
@ -2301,7 +2259,6 @@ sane_start(SANE_Handle handle)
|
|||
if (status != SANE_STATUS_GOOD)
|
||||
return status;
|
||||
|
||||
|
||||
/*
|
||||
status = sane_get_parameters(handle, NULL);
|
||||
if (status != SANE_STATUS_GOOD)
|
||||
|
|
|
@ -222,8 +222,7 @@ enum {
|
|||
OPT_BRIGHTNESS, OPT_SHARPNESS, OPT_GAMMA_CORRECTION, OPT_COLOR_CORRECTION,
|
||||
OPT_RESOLUTION, OPT_THRESHOLD, OPT_ADVANCED_GROUP, OPT_MIRROR,
|
||||
OPT_AAS, OPT_GAMMA_VECTOR_R, OPT_GAMMA_VECTOR_G, OPT_GAMMA_VECTOR_B,
|
||||
OPT_WAIT_FOR_BUTTON, OPT_CCT_GROUP, OPT_CCT_1, OPT_CCT_2, OPT_CCT_3,
|
||||
OPT_CCT_4, OPT_CCT_5, OPT_CCT_6, OPT_CCT_7, OPT_CCT_8, OPT_CCT_9,
|
||||
OPT_WAIT_FOR_BUTTON, OPT_CCT_GROUP, OPT_CCT_MODE, OPT_CCT_PROFILE,
|
||||
OPT_PREVIEW_GROUP, OPT_PREVIEW, OPT_GEOMETRY_GROUP,
|
||||
OPT_TL_X, OPT_TL_Y, OPT_BR_X, OPT_BR_Y, OPT_EQU_GROUP,
|
||||
OPT_SOURCE, OPT_AUTO_EJECT, OPT_FILM_TYPE, OPT_FOCUS, OPT_BAY,
|
||||
|
@ -239,6 +238,26 @@ typedef enum
|
|||
SANE_EPSON_NET /* network interface */
|
||||
} Epson_Connection_Type;
|
||||
|
||||
struct epson_profile
|
||||
{
|
||||
unsigned int model;
|
||||
double cct[4][9];
|
||||
};
|
||||
|
||||
enum {
|
||||
CCTP_REFLECTIVE = 0, CCTP_COLORNEG,
|
||||
CCTP_MONONEG, CCTP_COLORPOS
|
||||
};
|
||||
|
||||
struct epson_profile_map
|
||||
{
|
||||
char *name;
|
||||
unsigned int id;
|
||||
};
|
||||
|
||||
extern const struct epson_profile epson_cct_profiles[];
|
||||
extern const struct epson_profile_map epson_cct_models[];
|
||||
|
||||
/* hardware description */
|
||||
|
||||
struct Epson_Device
|
||||
|
@ -248,6 +267,8 @@ struct Epson_Device
|
|||
char *name;
|
||||
char *model;
|
||||
|
||||
unsigned int model_id;
|
||||
|
||||
SANE_Device sane;
|
||||
SANE_Int level;
|
||||
SANE_Range dpi_range;
|
||||
|
@ -295,6 +316,7 @@ struct Epson_Device
|
|||
SANE_Bool extended_commands;
|
||||
|
||||
struct EpsonCmd *cmd;
|
||||
const struct epson_profile *cct_profile;
|
||||
};
|
||||
|
||||
typedef struct Epson_Device Epson_Device;
|
||||
|
@ -317,6 +339,7 @@ struct Epson_Scanner
|
|||
SANE_Byte *buf, *end, *ptr;
|
||||
SANE_Bool canceling;
|
||||
SANE_Word gamma_table[3][256];
|
||||
SANE_Word cct_table[9];
|
||||
SANE_Int retry_count;
|
||||
|
||||
/* buffer lines for color shuffling */
|
||||
|
|
Ładowanie…
Reference in New Issue