kopia lustrzana https://gitlab.com/sane-project/backends
spelling fixes for hp3900 backend
rodzic
32aa1ef826
commit
f4fb21e334
|
@ -52,7 +52,7 @@ static SANE_Int cfg_chipset_model_get(SANE_Int device);
|
||||||
/* buttons for each scanner */
|
/* buttons for each scanner */
|
||||||
static SANE_Int cfg_buttons_get(struct st_buttons *reg);
|
static SANE_Int cfg_buttons_get(struct st_buttons *reg);
|
||||||
|
|
||||||
/* area constrains for each scanner */
|
/* area constraints for each scanner */
|
||||||
static SANE_Int cfg_constrains_get(struct st_constrains *constrain);
|
static SANE_Int cfg_constrains_get(struct st_constrains *constrain);
|
||||||
|
|
||||||
/* spectrum clock generator for each scanner */
|
/* spectrum clock generator for each scanner */
|
||||||
|
@ -989,7 +989,7 @@ static void cfg_offset_get(SANE_Int sensortype, SANE_Int resolution, SANE_Int sc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** SEC: Device constrains ---------- */
|
/** SEC: Device constraints ---------- */
|
||||||
|
|
||||||
static SANE_Int cfg_constrains_get(struct st_constrains *constrain)
|
static SANE_Int cfg_constrains_get(struct st_constrains *constrain)
|
||||||
{
|
{
|
||||||
|
@ -1003,7 +1003,7 @@ static SANE_Int cfg_constrains_get(struct st_constrains *constrain)
|
||||||
|
|
||||||
struct st_reg reg[] =
|
struct st_reg reg[] =
|
||||||
{
|
{
|
||||||
/* constrains are set in milimeters */
|
/* constraints are set in millimeters */
|
||||||
/*device , reflective , negative , transparent */
|
/*device , reflective , negative , transparent */
|
||||||
/* , {{left, width, top, height}, {left, width, top, height}, {left, width, top, height}}}, */
|
/* , {{left, width, top, height}, {left, width, top, height}, {left, width, top, height}}}, */
|
||||||
{ BQ5550 , {{ 0, 220, 0, 300}, { 88, 42, 0, 83}, { 88, 42, 0, 83}}},
|
{ BQ5550 , {{ 0, 220, 0, 300}, { 88, 42, 0, 83}, { 88, 42, 0, 83}}},
|
||||||
|
|
|
@ -1421,7 +1421,7 @@ dbg_registers (SANE_Byte * buffer)
|
||||||
DBG(DBG_FNC, " bit[0..3] = %02x : Scanner buttons ", iValue & 0x0f);
|
DBG(DBG_FNC, " bit[0..3] = %02x : Scanner buttons ", iValue & 0x0f);
|
||||||
if ((iValue & 0x0f) == 0x0f)
|
if ((iValue & 0x0f) == 0x0f)
|
||||||
DBG(DBG_FNC, "enabled\n");
|
DBG(DBG_FNC, "enabled\n");
|
||||||
else DBG(DBG_FNC, "dissabled\n");
|
else DBG(DBG_FNC, "disabled\n");
|
||||||
DBG(DBG_FNC, " bit[4..7] = ? : 0x%02x\n", (iValue >> 4) & 0x0f);
|
DBG(DBG_FNC, " bit[4..7] = ? : 0x%02x\n", (iValue >> 4) & 0x0f);
|
||||||
|
|
||||||
dbg_buffer(DBG_FNC, "\n0x0159", &buffer[0x159], 11, 0x159);
|
dbg_buffer(DBG_FNC, "\n0x0159", &buffer[0x159], 11, 0x159);
|
||||||
|
|
|
@ -555,11 +555,11 @@ static void Split_into_12bit_channels (SANE_Byte * destino,
|
||||||
static SANE_Int Scan_Read_BufferA (struct st_device *dev,
|
static SANE_Int Scan_Read_BufferA (struct st_device *dev,
|
||||||
SANE_Int buffer_size, SANE_Int arg2,
|
SANE_Int buffer_size, SANE_Int arg2,
|
||||||
SANE_Byte * pBuffer,
|
SANE_Byte * pBuffer,
|
||||||
SANE_Int * bytes_transfered);
|
SANE_Int * bytes_transferred);
|
||||||
|
|
||||||
static SANE_Int Bulk_Operation (struct st_device *dev, SANE_Byte op,
|
static SANE_Int Bulk_Operation (struct st_device *dev, SANE_Byte op,
|
||||||
SANE_Int buffer_size, SANE_Byte * buffer,
|
SANE_Int buffer_size, SANE_Byte * buffer,
|
||||||
SANE_Int * transfered);
|
SANE_Int * transferred);
|
||||||
static SANE_Int Get_PAG_Value (SANE_Byte scantype, SANE_Byte color);
|
static SANE_Int Get_PAG_Value (SANE_Byte scantype, SANE_Byte color);
|
||||||
static SANE_Int GetOneLineInfo (struct st_device *dev, SANE_Int resolution,
|
static SANE_Int GetOneLineInfo (struct st_device *dev, SANE_Int resolution,
|
||||||
SANE_Int * maximus, SANE_Int * minimus,
|
SANE_Int * maximus, SANE_Int * minimus,
|
||||||
|
@ -909,7 +909,7 @@ Motor_Curve_Parse (SANE_Int * mtc_count, SANE_Int * buffer)
|
||||||
if (*buffer == -2)
|
if (*buffer == -2)
|
||||||
{
|
{
|
||||||
/* end of motorcurve */
|
/* end of motorcurve */
|
||||||
/* complete any openned phase */
|
/* complete any opened phase */
|
||||||
/* close phase */
|
/* close phase */
|
||||||
phase = -1;
|
phase = -1;
|
||||||
}
|
}
|
||||||
|
@ -1597,7 +1597,7 @@ RTS_Scanner_SetParams (struct st_device *dev, struct params *param)
|
||||||
data_bitset (&dev->init_regs[0x146], 0x40,
|
data_bitset (&dev->init_regs[0x146], 0x40,
|
||||||
((dev->sensorcfg->type == CIS_SENSOR) ? 0 : 1));
|
((dev->sensorcfg->type == CIS_SENSOR) ? 0 : 1));
|
||||||
|
|
||||||
/* turn on appropiate lamp */
|
/* turn on appropriate lamp */
|
||||||
if (scan.scantype == ST_NORMAL)
|
if (scan.scantype == ST_NORMAL)
|
||||||
Lamp_Status_Set (dev, NULL, TRUE, FLB_LAMP);
|
Lamp_Status_Set (dev, NULL, TRUE, FLB_LAMP);
|
||||||
else
|
else
|
||||||
|
@ -2729,7 +2729,7 @@ Motor_Move (struct st_device *dev, SANE_Byte * Regs,
|
||||||
/* unknown data */
|
/* unknown data */
|
||||||
data_bitset (&cpRegs[0x1cf], 0x80, 1); /*x------- */
|
data_bitset (&cpRegs[0x1cf], 0x80, 1); /*x------- */
|
||||||
|
|
||||||
/* sets one chanel per color */
|
/* sets one channel per color */
|
||||||
data_bitset (&cpRegs[0x12], 0x3f, 0); /* channel */
|
data_bitset (&cpRegs[0x12], 0x3f, 0); /* channel */
|
||||||
data_bitset (&cpRegs[0x12], 0xc0, 1); /* 1 channel */
|
data_bitset (&cpRegs[0x12], 0xc0, 1); /* 1 channel */
|
||||||
|
|
||||||
|
@ -2924,7 +2924,7 @@ Load_MotorCurves (struct st_device *dev)
|
||||||
|
|
||||||
DBG (DBG_FNC, "> Load_MotorCurves\n");
|
DBG (DBG_FNC, "> Load_MotorCurves\n");
|
||||||
|
|
||||||
/* get motor setttings buffer for this device */
|
/* get motor settings buffer for this device */
|
||||||
mtc = cfg_motorcurve_get ();
|
mtc = cfg_motorcurve_get ();
|
||||||
if (mtc != NULL)
|
if (mtc != NULL)
|
||||||
{
|
{
|
||||||
|
@ -4342,7 +4342,7 @@ RTS_DMA_Write (struct st_device *dev, SANE_Int dmacs, SANE_Int options,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* for some reason it's not posible to allocate space to check
|
/* for some reason it's not possible to allocate space to check
|
||||||
sent buffer so we just write data */
|
sent buffer so we just write data */
|
||||||
Bulk_Operation (dev, BLK_WRITE, size, buffer, &transferred);
|
Bulk_Operation (dev, BLK_WRITE, size, buffer, &transferred);
|
||||||
rst = OK;
|
rst = OK;
|
||||||
|
@ -4401,7 +4401,7 @@ RTS_DMA_CheckType (struct st_device *dev, SANE_Byte * Regs)
|
||||||
if (RTS_DMA_SetType (dev, Regs, a) != OK)
|
if (RTS_DMA_SetType (dev, Regs, a) != OK)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* wait 1500 miliseconds */
|
/* wait 1500 milliseconds */
|
||||||
if (RTS_DMA_WaitReady (dev, 1500) == OK)
|
if (RTS_DMA_WaitReady (dev, 1500) == OK)
|
||||||
{
|
{
|
||||||
/* reset dma */
|
/* reset dma */
|
||||||
|
@ -7693,7 +7693,7 @@ arrangeline2 = 1
|
||||||
|
|
||||||
static SANE_Int
|
static SANE_Int
|
||||||
Scan_Read_BufferA (struct st_device *dev, SANE_Int buffer_size, SANE_Int arg2,
|
Scan_Read_BufferA (struct st_device *dev, SANE_Int buffer_size, SANE_Int arg2,
|
||||||
SANE_Byte * pBuffer, SANE_Int * bytes_transfered)
|
SANE_Byte * pBuffer, SANE_Int * bytes_transferred)
|
||||||
{
|
{
|
||||||
SANE_Int rst = OK;
|
SANE_Int rst = OK;
|
||||||
SANE_Byte *ptBuffer = NULL;
|
SANE_Byte *ptBuffer = NULL;
|
||||||
|
@ -7701,11 +7701,11 @@ Scan_Read_BufferA (struct st_device *dev, SANE_Int buffer_size, SANE_Int arg2,
|
||||||
struct st_readimage *rd = dev->Reading;
|
struct st_readimage *rd = dev->Reading;
|
||||||
|
|
||||||
DBG (DBG_FNC,
|
DBG (DBG_FNC,
|
||||||
"+ Scan_Read_BufferA(buffer_size=%i, arg2, *pBuffer, *bytes_transfered):\n",
|
"+ Scan_Read_BufferA(buffer_size=%i, arg2, *pBuffer, *bytes_transferred):\n",
|
||||||
buffer_size);
|
buffer_size);
|
||||||
|
|
||||||
arg2 = arg2; /* silence gcc */
|
arg2 = arg2; /* silence gcc */
|
||||||
*bytes_transfered = 0;
|
*bytes_transferred = 0;
|
||||||
|
|
||||||
if (pBuffer != NULL)
|
if (pBuffer != NULL)
|
||||||
{
|
{
|
||||||
|
@ -7841,7 +7841,7 @@ Scan_Read_BufferA (struct st_device *dev, SANE_Int buffer_size, SANE_Int arg2,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*bytes_transfered += iAmount;
|
*bytes_transferred += iAmount;
|
||||||
buffer_size -= iAmount;
|
buffer_size -= iAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7867,7 +7867,7 @@ Scan_Read_BufferA (struct st_device *dev, SANE_Int buffer_size, SANE_Int arg2,
|
||||||
/* is there any data read from scanner? */
|
/* is there any data read from scanner? */
|
||||||
if (rd->RDSize > 0)
|
if (rd->RDSize > 0)
|
||||||
{
|
{
|
||||||
/* Add to the given buffer so many bytes as posible */
|
/* Add to the given buffer as many bytes as possible */
|
||||||
SANE_Int iAmount;
|
SANE_Int iAmount;
|
||||||
|
|
||||||
iAmount = min (buffer_size, rd->RDSize);
|
iAmount = min (buffer_size, rd->RDSize);
|
||||||
|
@ -7889,16 +7889,16 @@ Scan_Read_BufferA (struct st_device *dev, SANE_Int buffer_size, SANE_Int arg2,
|
||||||
ptBuffer += iAmount;
|
ptBuffer += iAmount;
|
||||||
rd->RDSize -= iAmount;
|
rd->RDSize -= iAmount;
|
||||||
buffer_size -= iAmount;
|
buffer_size -= iAmount;
|
||||||
*bytes_transfered += iAmount;
|
*bytes_transferred += iAmount;
|
||||||
|
|
||||||
/* if there isn't any data in DMABuffer we can point RDStart
|
/* if there isn't any data in DMABuffer we can point RDStart
|
||||||
to the begining of DMABuffer */
|
to the beginning of DMABuffer */
|
||||||
if (rd->RDSize == 0)
|
if (rd->RDSize == 0)
|
||||||
rd->RDStart = rd->DMABuffer;
|
rd->RDStart = rd->DMABuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* in case of all data is read we return OK with bytes_transfered = 0 */
|
/* in case of all data is read we return OK with bytes_transferred = 0 */
|
||||||
if ((*bytes_transfered == 0)
|
if ((*bytes_transferred == 0)
|
||||||
|| ((rd->RDSize == 0) && (rd->ImageSize == 0)))
|
|| ((rd->RDSize == 0) && (rd->ImageSize == 0)))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -7907,7 +7907,7 @@ Scan_Read_BufferA (struct st_device *dev, SANE_Int buffer_size, SANE_Int arg2,
|
||||||
RTS_DMA_Cancel (dev);
|
RTS_DMA_Cancel (dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG (DBG_FNC, "-> *bytes_transfered=%i\n", *bytes_transfered);
|
DBG (DBG_FNC, "-> *bytes_transferred=%i\n", *bytes_transferred);
|
||||||
DBG (DBG_FNC, "-> Reading->ImageSize=%i\n", rd->ImageSize);
|
DBG (DBG_FNC, "-> Reading->ImageSize=%i\n", rd->ImageSize);
|
||||||
DBG (DBG_FNC, "-> Reading->DMAAmount=%i\n", rd->DMAAmount);
|
DBG (DBG_FNC, "-> Reading->DMAAmount=%i\n", rd->DMAAmount);
|
||||||
DBG (DBG_FNC, "-> Reading->RDSize =%i\n", rd->RDSize);
|
DBG (DBG_FNC, "-> Reading->RDSize =%i\n", rd->RDSize);
|
||||||
|
@ -7921,7 +7921,7 @@ static SANE_Int
|
||||||
Reading_BufferSize_Get (struct st_device *dev, SANE_Byte channels_per_dot,
|
Reading_BufferSize_Get (struct st_device *dev, SANE_Byte channels_per_dot,
|
||||||
SANE_Int channel_size)
|
SANE_Int channel_size)
|
||||||
{
|
{
|
||||||
/* returns the ammount of bytes in scanner's buffer ready to be read */
|
/* returns the amount of bytes in scanner's buffer ready to be read */
|
||||||
|
|
||||||
SANE_Int rst;
|
SANE_Int rst;
|
||||||
|
|
||||||
|
@ -10039,7 +10039,7 @@ Shading_apply (struct st_device *dev, SANE_Byte * Regs,
|
||||||
|
|
||||||
static SANE_Int
|
static SANE_Int
|
||||||
Bulk_Operation (struct st_device *dev, SANE_Byte op, SANE_Int buffer_size,
|
Bulk_Operation (struct st_device *dev, SANE_Byte op, SANE_Int buffer_size,
|
||||||
SANE_Byte * buffer, SANE_Int * transfered)
|
SANE_Byte * buffer, SANE_Int * transferred)
|
||||||
{
|
{
|
||||||
SANE_Int iTransferSize, iBytesToTransfer, iPos, rst, iBytesTransfered;
|
SANE_Int iTransferSize, iBytesToTransfer, iPos, rst, iBytesTransfered;
|
||||||
|
|
||||||
|
@ -10051,8 +10051,8 @@ Bulk_Operation (struct st_device *dev, SANE_Byte op, SANE_Int buffer_size,
|
||||||
rst = OK;
|
rst = OK;
|
||||||
iBytesTransfered = 0;
|
iBytesTransfered = 0;
|
||||||
|
|
||||||
if (transfered != NULL)
|
if (transferred != NULL)
|
||||||
*transfered = 0;
|
*transferred = 0;
|
||||||
|
|
||||||
iTransferSize = min (buffer_size, RTS_Debug->dmatransfersize);
|
iTransferSize = min (buffer_size, RTS_Debug->dmatransfersize);
|
||||||
|
|
||||||
|
@ -10072,8 +10072,8 @@ Bulk_Operation (struct st_device *dev, SANE_Byte op, SANE_Int buffer_size,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (transfered != NULL)
|
if (transferred != NULL)
|
||||||
*transfered += iBytesTransfered;
|
*transferred += iBytesTransfered;
|
||||||
}
|
}
|
||||||
iPos += iTransferSize;
|
iPos += iTransferSize;
|
||||||
iBytesToTransfer -= iTransferSize;
|
iBytesToTransfer -= iTransferSize;
|
||||||
|
@ -10095,8 +10095,8 @@ Bulk_Operation (struct st_device *dev, SANE_Byte op, SANE_Int buffer_size,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (transfered != NULL)
|
if (transferred != NULL)
|
||||||
*transfered += iTransferSize;
|
*transferred += iTransferSize;
|
||||||
}
|
}
|
||||||
iPos += iTransferSize;
|
iPos += iTransferSize;
|
||||||
iBytesToTransfer -= iTransferSize;
|
iBytesToTransfer -= iTransferSize;
|
||||||
|
@ -10763,7 +10763,7 @@ Lamp_Status_Set (struct st_device *dev, SANE_Byte * Regs, SANE_Int turn_on,
|
||||||
switch (dev->chipset->model)
|
switch (dev->chipset->model)
|
||||||
{
|
{
|
||||||
case RTS8822BL_03A:
|
case RTS8822BL_03A:
|
||||||
/* register 0xe946 has 2 bits and each one referres one lamp
|
/* register 0xe946 has 2 bits and each one refers one lamp
|
||||||
0x40: FLB_LAMP | 0x20 : TMA_LAMP
|
0x40: FLB_LAMP | 0x20 : TMA_LAMP
|
||||||
if both were enabled both lamps would be switched on */
|
if both were enabled both lamps would be switched on */
|
||||||
data_bitset (&Regs[0x146], 0x20, ((lamp == TMA_LAMP) && (turn_on == TRUE)) ? 1 : 0); /* TMA */
|
data_bitset (&Regs[0x146], 0x20, ((lamp == TMA_LAMP) && (turn_on == TRUE)) ? 1 : 0); /* TMA */
|
||||||
|
@ -14005,7 +14005,7 @@ Free_Constrains (struct st_device *dev)
|
||||||
static void
|
static void
|
||||||
RTS_DebugInit ()
|
RTS_DebugInit ()
|
||||||
{
|
{
|
||||||
/* Default vaules */
|
/* Default values */
|
||||||
RTS_Debug->dev_model = HP3970;
|
RTS_Debug->dev_model = HP3970;
|
||||||
|
|
||||||
RTS_Debug->DumpShadingData = FALSE;
|
RTS_Debug->DumpShadingData = FALSE;
|
||||||
|
@ -14428,7 +14428,7 @@ WShading_Emulate (SANE_Byte * buffer, SANE_Int * chnptr, SANE_Int size,
|
||||||
/* get channel color */
|
/* get channel color */
|
||||||
chncolor = data_lsb_get (buffer + pos, chnsize);
|
chncolor = data_lsb_get (buffer + pos, chnsize);
|
||||||
|
|
||||||
/* apply shading coeficient */
|
/* apply shading coefficient */
|
||||||
chncolor *= wshading->rates[*chnptr];
|
chncolor *= wshading->rates[*chnptr];
|
||||||
|
|
||||||
/* care about limits */
|
/* care about limits */
|
||||||
|
|
|
@ -157,7 +157,7 @@ typedef struct
|
||||||
SANE_Int rest_amount;
|
SANE_Int rest_amount;
|
||||||
SANE_Int mylin;
|
SANE_Int mylin;
|
||||||
|
|
||||||
/* convertion settings */
|
/* conversion settings */
|
||||||
struct st_convert cnv;
|
struct st_convert cnv;
|
||||||
|
|
||||||
/* ranges */
|
/* ranges */
|
||||||
|
@ -188,7 +188,7 @@ static SANE_Status bknd_models (TScanner * scanner);
|
||||||
static SANE_Status bknd_resolutions (TScanner * scanner, SANE_Int model);
|
static SANE_Status bknd_resolutions (TScanner * scanner, SANE_Int model);
|
||||||
static SANE_Status bknd_sources (TScanner * scanner, SANE_Int model);
|
static SANE_Status bknd_sources (TScanner * scanner, SANE_Int model);
|
||||||
|
|
||||||
/* convertions */
|
/* conversions */
|
||||||
static void Color_Negative (SANE_Byte * buffer, SANE_Int size,
|
static void Color_Negative (SANE_Byte * buffer, SANE_Int size,
|
||||||
SANE_Int depth);
|
SANE_Int depth);
|
||||||
static void Color_to_Gray (SANE_Byte * buffer, SANE_Int size, SANE_Int depth);
|
static void Color_to_Gray (SANE_Byte * buffer, SANE_Int size, SANE_Int depth);
|
||||||
|
@ -894,7 +894,7 @@ gamma_create (TScanner * s, double gamma)
|
||||||
/* default result */
|
/* default result */
|
||||||
rst = OK;
|
rst = OK;
|
||||||
|
|
||||||
/* destroy previus gamma tables */
|
/* destroy previous gamma tables */
|
||||||
gamma_free (s);
|
gamma_free (s);
|
||||||
|
|
||||||
/* check gamma value */
|
/* check gamma value */
|
||||||
|
@ -1161,7 +1161,7 @@ options_init (TScanner * scanner)
|
||||||
/* set gamma */
|
/* set gamma */
|
||||||
gamma_create (scanner, 1.0);
|
gamma_create (scanner, 1.0);
|
||||||
|
|
||||||
/* color convertion */
|
/* color conversion */
|
||||||
scanner->cnv.colormode = -1;
|
scanner->cnv.colormode = -1;
|
||||||
scanner->cnv.negative = FALSE;
|
scanner->cnv.negative = FALSE;
|
||||||
scanner->cnv.threshold = 40;
|
scanner->cnv.threshold = 40;
|
||||||
|
@ -1178,12 +1178,12 @@ options_init (TScanner * scanner)
|
||||||
scanner->rng_gamma.max = 65535;
|
scanner->rng_gamma.max = 65535;
|
||||||
scanner->rng_gamma.quant = 0;
|
scanner->rng_gamma.quant = 0;
|
||||||
|
|
||||||
/* setting default horizontal constrain in milimeters */
|
/* setting default horizontal constraint in millimeters */
|
||||||
scanner->rng_horizontal.min = 0;
|
scanner->rng_horizontal.min = 0;
|
||||||
scanner->rng_horizontal.max = 220;
|
scanner->rng_horizontal.max = 220;
|
||||||
scanner->rng_horizontal.quant = 1;
|
scanner->rng_horizontal.quant = 1;
|
||||||
|
|
||||||
/* setting default vertical constrain in milimeters */
|
/* setting default vertical constraint in millimeters */
|
||||||
scanner->rng_vertical.min = 0;
|
scanner->rng_vertical.min = 0;
|
||||||
scanner->rng_vertical.max = 300;
|
scanner->rng_vertical.max = 300;
|
||||||
scanner->rng_vertical.quant = 1;
|
scanner->rng_vertical.quant = 1;
|
||||||
|
@ -2261,7 +2261,7 @@ sane_get_parameters (SANE_Handle h, SANE_Parameters * p)
|
||||||
/* resolution */
|
/* resolution */
|
||||||
res = s->aValues[opt_resolution].w;
|
res = s->aValues[opt_resolution].w;
|
||||||
|
|
||||||
/* image coordinates in milimeters */
|
/* image coordinates in millimeters */
|
||||||
coords.left = s->aValues[opt_tlx].w;
|
coords.left = s->aValues[opt_tlx].w;
|
||||||
coords.top = s->aValues[opt_tly].w;
|
coords.top = s->aValues[opt_tly].w;
|
||||||
coords.width = s->aValues[opt_brx].w;
|
coords.width = s->aValues[opt_brx].w;
|
||||||
|
@ -2384,7 +2384,7 @@ sane_start (SANE_Handle h)
|
||||||
RTS_Debug->SaveCalibFile =
|
RTS_Debug->SaveCalibFile =
|
||||||
(s->aValues[opt_dbgimages].w == SANE_TRUE) ? TRUE : FALSE;
|
(s->aValues[opt_dbgimages].w == SANE_TRUE) ? TRUE : FALSE;
|
||||||
|
|
||||||
/* Get image coordinates in milimeters */
|
/* Get image coordinates in millimeters */
|
||||||
coords.left = s->aValues[opt_tlx].w;
|
coords.left = s->aValues[opt_tlx].w;
|
||||||
coords.top = s->aValues[opt_tly].w;
|
coords.top = s->aValues[opt_tly].w;
|
||||||
coords.width = s->aValues[opt_brx].w;
|
coords.width = s->aValues[opt_brx].w;
|
||||||
|
@ -2583,7 +2583,7 @@ sane_read (SANE_Handle h, SANE_Byte * buf, SANE_Int maxlen, SANE_Int * len)
|
||||||
buf : will contain postprocessed image
|
buf : will contain postprocessed image
|
||||||
len : will contain size in bytes of postprocessed image */
|
len : will contain size in bytes of postprocessed image */
|
||||||
|
|
||||||
/* apply gamma if neccesary */
|
/* apply gamma if necessary */
|
||||||
if (RTS_Debug->EnableGamma == TRUE)
|
if (RTS_Debug->EnableGamma == TRUE)
|
||||||
gamma_apply (s, buffer, emul_len, s->ScanParams.depth);
|
gamma_apply (s, buffer, emul_len, s->ScanParams.depth);
|
||||||
|
|
||||||
|
@ -2623,7 +2623,7 @@ sane_read (SANE_Handle h, SANE_Byte * buf, SANE_Int maxlen, SANE_Int * len)
|
||||||
{
|
{
|
||||||
/* I didn't see any scanner supporting lineart mode.
|
/* I didn't see any scanner supporting lineart mode.
|
||||||
Windows drivers scan in grayscale and then convert image to lineart
|
Windows drivers scan in grayscale and then convert image to lineart
|
||||||
so let's perform convertion */
|
so let's perform conversion */
|
||||||
SANE_Int rest = emul_len % 8;
|
SANE_Int rest = emul_len % 8;
|
||||||
|
|
||||||
Gray_to_Lineart (buffer, emul_len, s->cnv.threshold);
|
Gray_to_Lineart (buffer, emul_len, s->cnv.threshold);
|
||||||
|
@ -2691,7 +2691,7 @@ sane_close (SANE_Handle h)
|
||||||
|
|
||||||
DBG (DBG_FNC, "- sane_close...\n");
|
DBG (DBG_FNC, "- sane_close...\n");
|
||||||
|
|
||||||
/* stop previus scans */
|
/* stop previous scans */
|
||||||
RTS_Scanner_StopScan (device, TRUE);
|
RTS_Scanner_StopScan (device, TRUE);
|
||||||
|
|
||||||
/* close usb */
|
/* close usb */
|
||||||
|
@ -2700,7 +2700,7 @@ sane_close (SANE_Handle h)
|
||||||
/* free scanner internal variables */
|
/* free scanner internal variables */
|
||||||
RTS_Scanner_End (device);
|
RTS_Scanner_End (device);
|
||||||
|
|
||||||
/* free RTS enviroment */
|
/* free RTS environment */
|
||||||
RTS_Free (device);
|
RTS_Free (device);
|
||||||
|
|
||||||
/* free backend variables */
|
/* free backend variables */
|
||||||
|
|
Ładowanie…
Reference in New Issue