summaryrefslogtreecommitdiff
path: root/backend/hp5590.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-10-08 12:33:06 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-10-08 12:33:06 +0200
commit24feb9f37f302c006ba51502da817325200e74d0 (patch)
treed4451782449e5fcbae9cbe3778c51a8c6cb3c36d /backend/hp5590.c
parent76b69ebb381d40458339c9940135740797cbd2d4 (diff)
parentcfd27ef2ad8b005fd47ab41ef29b71d9e3d48201 (diff)
Merge tag 'upstream/1.0.25'
Upstream version 1.0.25
Diffstat (limited to 'backend/hp5590.c')
-rw-r--r--backend/hp5590.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/backend/hp5590.c b/backend/hp5590.c
index 8db3d5e..7b1cd60 100644
--- a/backend/hp5590.c
+++ b/backend/hp5590.c
@@ -1239,6 +1239,14 @@ convert_to_rgb (struct hp5590_scanner *scanner, SANE_Byte *data, SANE_Int size)
buf[i*6+5] = ptr[2*i+bytes_per_color*2];
}
}
+
+ /* Invert pixels in case of TMA Negatives source has been selected */
+ if (scanner->source == SOURCE_TMA_NEGATIVES)
+ {
+ for (i = 0; i < bytes_per_line; i++)
+ buf[i] ^= 0xff;
+ }
+
memcpy (ptr, buf, bytes_per_line);
}
free (buf);