color and grayscale negatives scan in TPU mode

for CS8800F and CS9000F
merge-requests/1/head
Rolf Bensch 2012-04-04 15:15:18 +02:00
rodzic 9c6afe1b95
commit 9fc0ac9d1b
5 zmienionych plików z 104 dodań i 57 usunięć

Wyświetl plik

@ -1,3 +1,7 @@
2012-04-04 Rolf Bensch <rolf at bensch hyphen online dot de>
* backend/pixma.[ch], backend/pixma_mp810.c, po/de.po: color and grayscale
negatives scan in TPU mode, for CS8800F and CS9000F.
2012-04-04 Rolf Bensch <rolf at bensch hyphen online dot de>
* backend/pixma_mp810.c: cropping y and h to scanable area in TPU mode,
for CS8800F and CS9000F.
@ -19,7 +23,7 @@
- Fixed bug using wrong enum in x/y range check.
2012-03-22 Rolf Bensch <rolf at bensch hyphen online dot de>
* backends/po/de.po: New German translations for pixma backend.
* po/de.po: New German translations for pixma backend.
2012-03-21 Mike Kelly <mike@piratehaven.org>
* backends/avision.[ch]:

Wyświetl plik

@ -104,8 +104,8 @@ typedef struct pixma_sane_t
option_descriptor_t opt[opt_last];
SANE_Range xrange, yrange;
SANE_Word dpi_list[9]; /* up to 9600 dpi */
SANE_String_Const mode_list[4];
pixma_scan_mode_t mode_map[4];
SANE_String_Const mode_list[5];
pixma_scan_mode_t mode_map[5];
uint8_t gamma_table[4096];
SANE_String_Const source_list[4];
pixma_paper_source_t source_map[4];
@ -352,7 +352,18 @@ create_mode_list (pixma_sane_t * ss, SANE_Bool tpu)
ss->mode_map[i] = PIXMA_SCAN_MODE_GRAY;
i++;
}
if (tpu && cfg->cap & PIXMA_CAP_NEGATIVE)
{
ss->mode_list[i] = SANE_I18N ("Negative color");
ss->mode_map[i] = PIXMA_SCAN_MODE_NEGATIVE_COLOR;
i++;
if (cfg->cap & PIXMA_CAP_GRAY)
{
ss->mode_list[i] = SANE_I18N ("Negative gray");
ss->mode_map[i] = PIXMA_SCAN_MODE_NEGATIVE_GRAY;
i++;
}
}
if (!tpu && cfg->cap & PIXMA_CAP_LINEART)
{
ss->mode_list[i] = SANE_VALUE_SCAN_MODE_LINEART;
@ -385,7 +396,8 @@ create_dpi_list (pixma_sane_t * ss, SANE_Bool ext)
* 75 dpi: j = 0
* 150 dpi: j = 1 \
* 300 dpi: j = 2 |--> from cfg->ext_min_dpi for ADF/TPU
* ... / */
* ... /
* */
j = 0;
if (ext && cfg->ext_min_dpi)
{

Wyświetl plik

@ -147,6 +147,7 @@ typedef uint32_t uint32_t;
#define PIXMA_CAP_CIS (0)
#define PIXMA_CAP_CCD (1 << 8)
#define PIXMA_CAP_LINEART (1 << 9)
#define PIXMA_CAP_NEGATIVE (1 << 10)
#define PIXMA_CAP_EXPERIMENT (1 << 31)
/**@}*/
@ -204,6 +205,9 @@ typedef enum pixma_scan_mode_t
/* standard scan modes */
PIXMA_SCAN_MODE_COLOR,
PIXMA_SCAN_MODE_GRAY,
/* TPU scan modes for negatives */
PIXMA_SCAN_MODE_NEGATIVE_COLOR,
PIXMA_SCAN_MODE_NEGATIVE_GRAY,
/* 1 bit lineart scan mode */
PIXMA_SCAN_MODE_LINEART
} pixma_scan_mode_t;

Wyświetl plik

@ -740,13 +740,6 @@ send_scan_param (pixma_t * s)
{
data[0x00] = 0x04;
data[0x01] = 0x02;
data[0x1e] = 0x02; /* NB: CanoScan 8800F: 0x02->negatives, 0x01->positives, paper->0x00 */
/* the above appears to be same for the 9000F also */
/* set it positives for 9000F for now */
if (s->cfg->pid == CS9000F_PID)
{
data[0x1e] = 0x01;
}
}
data[0x02] = 0x01;
if (is_scanning_from_adfdup (s))
@ -786,16 +779,46 @@ send_scan_param (pixma_t * s)
data[0x21] = 0x81;
data[0x23] = 0x02;
data[0x24] = 0x01;
if (s->cfg->pid == CS8800F_PID || s->cfg->pid == CS9000F_PID) /* CS8800F & CS9000F addition */
data[0x25] = (is_scanning_from_tpu (s)) ? 0x00 : 0x01; /* 0x01 normally, 0x00 for TPU color management*/
/* fix this: for 9000F : it should be 0x00 for flatbed, 0x01 if
scanning from TPU in slide mode, and 0x02 in negative mode */
if (s->cfg->pid == CS9000F_PID)
/* CS8800F & CS9000F addition */
if (s->cfg->pid == CS8800F_PID || s->cfg->pid == CS9000F_PID)
{
if (is_scanning_from_tpu (s))
{ /* TPU */
/* 0x02->negatives, 0x01->positives, paper->0x00
* no paper in TPU mode */
if (s->param->mode == PIXMA_SCAN_MODE_NEGATIVE_COLOR
|| s->param->mode == PIXMA_SCAN_MODE_NEGATIVE_GRAY)
{
PDBG (pixma_dbg (4, "*send_scan_param***** TPU scan negatives *****\n"));
data[0x1e] = 0x02;
}
else
{
PDBG (pixma_dbg (4, "*send_scan_param***** TPU scan positives *****\n"));
data[0x1e] = 0x01;
}
/* CS8800F: 0x00 for TPU color management */
if (s->cfg->pid == CS8800F_PID)
data[0x25] = 0x00;
/* CS9000F: 0x01 for TPU */
if (s->cfg->pid == CS9000F_PID)
data[0x25] = 0x01;
}
else
{ /* flatbed and ADF */
/* paper->0x00 */
data[0x1e] = 0x00;
/* CS8800F: 0x01 normally */
if (s->cfg->pid == CS8800F_PID)
data[0x25] = 0x01;
/* CS9000F: 0x00 normally */
if (s->cfg->pid == CS9000F_PID)
data[0x25] = 0x00;
}
}
/* FIXME: This makes no sense, we only need 0x28 bytes */
data[0x30] = 0x01;
}
return pixma_exec (s, &mp->cb);
@ -1536,10 +1559,17 @@ mp810_check_param (pixma_t * s, pixma_scan_param_t * sp)
/* PDBG (pixma_dbg (4, "*mp810_check_param***** Initially: channels=%u, depth=%u, x=%u, y=%u, w=%u, h=%u, xs=%u, wx=%u *****\n",
sp->channels, sp->depth, sp->x, sp->y, sp->w, sp->h, sp->xs, sp->wx)); */
/* MP810 only supports 8 bit per channel in color and grayscale mode */
if (sp->depth != 1)
{
sp->channels = 3;
sp->software_lineart = 0;
switch (sp->mode)
{
/* standard scan modes */
/* 8 bit per channel in color and grayscale mode */
case PIXMA_SCAN_MODE_GRAY:
case PIXMA_SCAN_MODE_NEGATIVE_GRAY:
sp->channels = 1;
case PIXMA_SCAN_MODE_COLOR:
case PIXMA_SCAN_MODE_NEGATIVE_COLOR:
sp->depth = 8;
#ifdef TPU_48
#ifndef DEBUG_TPU_48
@ -1547,13 +1577,13 @@ mp810_check_param (pixma_t * s, pixma_scan_param_t * sp)
#endif
sp->depth = 16; /* TPU in 16 bits mode */
#endif
}
else
{
break;
/* software lineart */
case PIXMA_SCAN_MODE_LINEART:
sp->software_lineart = 1;
sp->depth = 1;
sp->channels = 1;
sp->depth = 1;
break;
}
/* for software lineart w must be a multiple of 8 */
@ -2029,7 +2059,7 @@ const pixma_config_t pixma_mp810_devices[] = {
DEVICE ("Canon Pixma MP970", "MP970", MP970_PID, 4800, 300, 0, 638, 877, PIXMA_CAP_CCD | PIXMA_CAP_TPU),
/* Flatbed scanner CCD (2007) */
DEVICE ("Canoscan 8800F", "8800F", CS8800F_PID, 4800, 300, 0, 638, 877, PIXMA_CAP_CCD | PIXMA_CAP_TPU),
DEVICE ("Canoscan 8800F", "8800F", CS8800F_PID, 4800, 300, 0, 638, 877, PIXMA_CAP_CCD | PIXMA_CAP_TPU | PIXMA_CAP_NEGATIVE),
/* PIXMA 2008 vintage CCD */
DEVICE ("Canon MP980 series", "MP980", MP980_PID, 4800, 300, 0, 638, 877, PIXMA_CAP_CCD | PIXMA_CAP_TPU),
@ -2038,7 +2068,7 @@ const pixma_config_t pixma_mp810_devices[] = {
DEVICE ("Canon MP990 series", "MP990", MP990_PID, 4800, 300, 0, 638, 877, PIXMA_CAP_CCD | PIXMA_CAP_TPU),
/* Flatbed scanner (2010) */
DEVICE ("Canoscan 9000F", "9000F", CS9000F_PID, 4800, 300, 9600, 638, 877, PIXMA_CAP_CCD | PIXMA_CAP_TPU),
DEVICE ("Canoscan 9000F", "9000F", CS9000F_PID, 4800, 300, 9600, 638, 877, PIXMA_CAP_CCD | PIXMA_CAP_TPU | PIXMA_CAP_NEGATIVE),
/* Latest devices (2010) Generation 4 CCD untested */
DEVICE ("Canon PIXMA MG8100", "MG8100", MG8100_PID, 4800, 300, 0, 638, 877, PIXMA_CAP_CCD | PIXMA_CAP_TPU),

Wyświetl plik

@ -14,7 +14,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sane-backends\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-22 12:13+0100\n"
"POT-Creation-Date: 2012-04-04 14:50+0200\n"
"PO-Revision-Date: 2010-08-06 17:17+0100\n"
"Last-Translator: Rolf Bensch <rolf at bensch hyphen online dot de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@ -1574,7 +1574,7 @@ msgstr "Wählt den Filmtyp aus"
#: ../backend/hp3900_sane.c:427 ../backend/hp3900_sane.c:1017
#: ../backend/hp5590.c:82 ../backend/ma1509.c:108
#: ../backend/magicolor.c:167 ../backend/mustek.c:156
#: ../backend/mustek.c:160 ../backend/mustek.c:164 ../backend/pixma.c:801
#: ../backend/mustek.c:160 ../backend/mustek.c:164 ../backend/pixma.c:813
#: ../backend/pixma_sane_options.c:88 ../backend/snapscan-options.c:82
#: ../backend/test.c:192 ../backend/umax.c:181
#, no-c-format
@ -1595,7 +1595,7 @@ msgstr "Automatischer Dokumenteneinzug hinten"
#: ../backend/canon_dr.c:341 ../backend/epjitsu.c:206
#: ../backend/fujitsu.c:569 ../backend/hp5590.c:84 ../backend/kodak.c:137
#: ../backend/pixma.c:812
#: ../backend/pixma.c:824
#, no-c-format
msgid "ADF Duplex"
msgstr "ADF-Duplex"
@ -1672,14 +1672,14 @@ msgstr "Einseitig"
msgid "Duplex"
msgstr "Duplex"
#: ../backend/epson.c:502 ../backend/epson2.c:115 ../backend/pixma.c:818
#: ../backend/epson.c:502 ../backend/epson2.c:115 ../backend/pixma.c:830
#, no-c-format
msgid "Transparency Unit"
msgstr "Durchlichtaufsatz"
#: ../backend/epson.c:503 ../backend/epson2.c:117
#: ../backend/magicolor.c:168 ../backend/mustek.c:160
#: ../backend/pixma.c:806 ../backend/test.c:192 ../backend/umax.c:183
#: ../backend/pixma.c:818 ../backend/test.c:192 ../backend/umax.c:183
#, no-c-format
msgid "Automatic Document Feeder"
msgstr "Autom. Dokumenteneinzug"
@ -4435,6 +4435,16 @@ msgstr ""
"Warte solange, bis die Helligkeit der Lampe konstant ist anstatt einfach "
"40 Sekunden zu warten."
#: ../backend/pixma.c:357
#, no-c-format
msgid "Negative color"
msgstr "Negativfilm Farbe"
#: ../backend/pixma.c:362
#, no-c-format
msgid "Negative gray"
msgstr "Negativfilm Graustufen"
#: ../backend/pixma_sane_options.c:94
#, no-c-format
msgid "Button-controlled scan"
@ -5685,16 +5695,3 @@ msgstr "Legt den Offset des grünen Kanals fest"
#, no-c-format
msgid "Sets blue channel offset"
msgstr "Legt den Offset des blauen Kanals fest"
#~ msgid "Grayscale"
#~ msgstr "Graustufen"
#, fuzzy
#~ msgid "Binary"
#~ msgstr "Schwarzweiss"
#~ msgid "Display a shortened resolution list"
#~ msgstr "Zeigt eine verkürzte Auflösungsliste an"
#~ msgid "Black & White"
#~ msgstr "Schwarzweiß"