summaryrefslogtreecommitdiff
path: root/qadevOOo/runner/convwatch/PixelCounter.java
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/runner/convwatch/PixelCounter.java')
-rw-r--r--qadevOOo/runner/convwatch/PixelCounter.java26
1 files changed, 13 insertions, 13 deletions
diff --git a/qadevOOo/runner/convwatch/PixelCounter.java b/qadevOOo/runner/convwatch/PixelCounter.java
index 116b07e48d8e..9df41f540083 100644
--- a/qadevOOo/runner/convwatch/PixelCounter.java
+++ b/qadevOOo/runner/convwatch/PixelCounter.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -45,14 +45,14 @@ class CountNotWhite extends CountPixel
{
// System.out.println("CountWhite()");
}
-
+
public void count(int pixel)
{
int alpha = (pixel >> 24) & 0xff;
int red = (pixel >> 16) & 0xff;
int green = (pixel >> 8) & 0xff;
int blue = (pixel ) & 0xff;
-
+
// System.out.println(String.valueOf(red) + ":" + String.valueOf(green) + ":" + String.valueOf(blue));
if (red == 0xff && green == 0xff && blue == 0xff)
{
@@ -69,14 +69,14 @@ class CountNotBlack extends CountPixel
{
// System.out.println("CountBlack()");
}
-
+
public void count(int pixel)
{
int alpha = (pixel >> 24) & 0xff;
int red = (pixel >> 16) & 0xff;
int green = (pixel >> 8) & 0xff;
int blue = (pixel ) & 0xff;
-
+
if (red == 0x00 && green == 0x00 && blue == 0x00)
{
return;
@@ -97,7 +97,7 @@ class graphics_stuff
int blue = rgba & 0xff;
int alpha = (rgba >> 24) & 0xff;
// (2) now modify red, green, blue and alpha as you like;
-// make sure that each of the four values stays in the
+// make sure that each of the four values stays in the
// interval 0 to 255
// ...
// (3) and encode back to an int, e.g. to give it to MemoryImageSource or
@@ -105,7 +105,7 @@ class graphics_stuff
rgba = (alpha << 24) | (red << 16) | (green << 8) | blue;
return 0;
}
-
+
public static void handlesinglepixel(int x, int y, int pixel)
{
int alpha = (pixel >> 24) & 0xff;
@@ -133,7 +133,7 @@ class graphics_stuff
countPixel(_aImage, 0, 0, w, h, aCountNotWhite);
return aCountNotWhite.getCount();
}
-
+
public static int countNotBlackPixel(ImageHelper _aImage)
{
int w = _aImage.getWidth();
@@ -150,8 +150,8 @@ class graphics_stuff
public class PixelCounter {
// private Image m_aImage;
ImageHelper m_aImage;
-
-
+
+
public int countNotWhitePixel(String _sFile)
throws java.io.IOException
{
@@ -167,14 +167,14 @@ public class PixelCounter {
int nw = graphics_stuff.countNotBlackPixel(m_aImage);
return nw;
}
-
+
public static int countNotWhitePixelsFromImage(String _sFile)
throws java.io.IOException
{
PixelCounter a = new PixelCounter();
return a.countNotWhitePixel(_sFile);
}
-
+
public static int countNotBlackPixelsFromImage(String _sFile)
throws java.io.IOException
{
@@ -202,5 +202,5 @@ public class PixelCounter {
// }
}
-
+