summaryrefslogtreecommitdiff
path: root/japi/ScanIt.java
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-03-30 21:30:45 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-03-30 21:30:45 +0200
commitee770c2346eb37e0dcb8b6cf3eaacf3d8efd6bbc (patch)
tree58f05092be1a17a939e861f8cadcda1b6ca2ecef /japi/ScanIt.java
parent0da9e21872802cfc6e975b1ebaf9efb9e5934d84 (diff)
parentfef76e17ed4c607ea73b81279f9ef1d7121be900 (diff)
Merge branch 'release/experimental/1.0.29-1_experimental1'experimental/1.0.29-1_experimental1
Diffstat (limited to 'japi/ScanIt.java')
-rw-r--r--japi/ScanIt.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/japi/ScanIt.java b/japi/ScanIt.java
index 21afba0..a357626 100644
--- a/japi/ScanIt.java
+++ b/japi/ScanIt.java
@@ -156,7 +156,7 @@ public class ScanIt implements ImageProducer
*/
public synchronized void removeConsumer(ImageConsumer ic)
{ consumers.removeElement(ic); }
-
+
/*
* Add a consumer and start scanning.
*/
@@ -224,7 +224,7 @@ public class ScanIt implements ImageProducer
// Single frame.
for (i = 0; i < readLen; ++i)
{ // Doing a single color frame.
- image[offset + i] |=
+ image[offset + i] |=
(((int) data[i]) & 0xff) << (8*cindex);
++x;
if (x >= width)
@@ -235,7 +235,7 @@ public class ScanIt implements ImageProducer
for (i = 0; i < readLen; ++i)
{
int b = 2 - (offset + i)%3;
- image[(offset + i)/3] |=
+ image[(offset + i)/3] |=
(((int) data[i]) & 0xff) << (8*b);
if (b == 0)
{
@@ -261,7 +261,7 @@ public class ScanIt implements ImageProducer
offset += readLen; // Update where we are.
// Show it.
System.out.println("PrevY = " + prevY + ", y = " + y);
-// tellPixels(0, prevY, width, y - prevY);
+// tellPixels(0, prevY, width, y - prevY);
tellPixels(0, 0, width, height);
return true;
}
@@ -289,7 +289,7 @@ public class ScanIt implements ImageProducer
status = sane.start(handle);
if (status != Sane.STATUS_GOOD)
{
- System.out.println("start() failed. Status= "
+ System.out.println("start() failed. Status= "
+ status);
tellStatus(ImageConsumer.IMAGEERROR);
return;
@@ -297,7 +297,7 @@ public class ScanIt implements ImageProducer
status = sane.getParameters(handle, parms);
if (status != Sane.STATUS_GOOD)
{
- System.out.println("getParameters() failed. Status= "
+ System.out.println("getParameters() failed. Status= "
+ status);
tellStatus(ImageConsumer.IMAGEERROR);
return; //++++cleanup.
@@ -342,7 +342,7 @@ public class ScanIt implements ImageProducer
catch (IOException e)
{ //+++++++++++++++
System.out.println("I/O error writing file.");
- }
+ }
outputFile = null; // Clear for next time.
}
tellStatus(ImageConsumer.STATICIMAGEDONE);
@@ -364,7 +364,7 @@ public class ScanIt implements ImageProducer
case SaneParameters.FRAME_GREEN:
case SaneParameters.FRAME_BLUE:
case SaneParameters.FRAME_RGB:
- pout.print("P6\n# SANE data follows\n" +
+ pout.print("P6\n# SANE data follows\n" +
width + ' ' + height + "\n255\n");
for (i = 0; i < len; i++)
{