kopia lustrzana https://gitlab.com/sane-project/backends
Fixed bytes_per_line in 1 bit mode. Fixed 1 bit color three-pass mode
(grid). Changed bit order for 1 bit color to most significant bit is first pixel.DEVEL_2_0_BRANCH-1
rodzic
16762f0a4c
commit
2958f7a844
|
@ -143,7 +143,9 @@ init_picture_buffer (Test_Device * test_device, SANE_Byte ** buffer,
|
|||
|
||||
if (test_device->params.depth == 1)
|
||||
{
|
||||
if (test_device->params.format == SANE_FRAME_GRAY)
|
||||
if (test_device->params.format == SANE_FRAME_GRAY ||
|
||||
(test_device->params.format >= SANE_FRAME_RED &&
|
||||
test_device->params.format <= SANE_FRAME_BLUE))
|
||||
{
|
||||
SANE_Byte value = 0;
|
||||
for (x1 = 0; x1 < 8; x1++)
|
||||
|
@ -170,7 +172,7 @@ init_picture_buffer (Test_Device * test_device, SANE_Byte ** buffer,
|
|||
SANE_Byte value = 0;
|
||||
for (x1 = 0; x1 < 8; x1++)
|
||||
{
|
||||
SANE_Word xfull = x * 8 / 3 + x1;
|
||||
SANE_Word xfull = x * 8 / 3 + (7 - x1);
|
||||
|
||||
if (xfull < ppl)
|
||||
{
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
This backend is for testing frontends.
|
||||
*/
|
||||
|
||||
#define BUILD 17
|
||||
#define BUILD 18
|
||||
|
||||
#include "../include/sane/config.h"
|
||||
|
||||
|
@ -2316,7 +2316,7 @@ sane_get_parameters (SANE_Handle handle, SANE_Parameters * params)
|
|||
channels = 3;
|
||||
|
||||
if (p->depth == 1)
|
||||
p->bytes_per_line = channels * (p->pixels_per_line + 7) / 8;
|
||||
p->bytes_per_line = channels * (int) ((p->pixels_per_line + 7) / 8);
|
||||
else /* depth == 8 || depth == 16 */
|
||||
p->bytes_per_line = channels * p->pixels_per_line * ((p->depth + 7) / 8);
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
;
|
||||
|
||||
:backend "test" ; name of backend
|
||||
:version "1.0-17" ; version of backend
|
||||
:version "1.0-18" ; version of backend
|
||||
:status :stable ; :alpha, :beta, :stable, :new
|
||||
:manpage "sane-test" ; name of manpage (if it exists)
|
||||
:url "http://www.meier-geinitz.de/sane/test-backend/" ; backend's web page
|
||||
|
|
Ładowanie…
Reference in New Issue