summaryrefslogtreecommitdiff
path: root/qadevOOo/runner/graphical/PixelCounter.java
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/runner/graphical/PixelCounter.java')
-rw-r--r--qadevOOo/runner/graphical/PixelCounter.java26
1 files changed, 13 insertions, 13 deletions
diff --git a/qadevOOo/runner/graphical/PixelCounter.java b/qadevOOo/runner/graphical/PixelCounter.java
index e625c2a75b12..b18c9d89d9a6 100644
--- a/qadevOOo/runner/graphical/PixelCounter.java
+++ b/qadevOOo/runner/graphical/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
@@ -43,14 +43,14 @@ class CountNotWhite extends CountPixel
{
// System.out.println("CountWhite()");
}
-
+
public void countold(final int pixel)
{
// final int alpha = (pixel >> 24) & 0xff;
final int red = (pixel >> 16) & 0xff;
final int green = (pixel >> 8) & 0xff;
final int blue = (pixel ) & 0xff;
-
+
// System.out.println(String.valueOf(red) + ":" + String.valueOf(green) + ":" + String.valueOf(blue));
if (red == 0xff && green == 0xff && blue == 0xff)
{
@@ -89,14 +89,14 @@ class CountNotBlack extends CountPixel
{
// System.out.println("CountBlack()");
}
-
+
public void countold(final int pixel)
{
// final int alpha = (pixel >> 24) & 0xff;
final int red = (pixel >> 16) & 0xff;
final int green = (pixel >> 8) & 0xff;
final int blue = (pixel ) & 0xff;
-
+
if (red == 0x00 && green == 0x00 && blue == 0x00)
{
return;
@@ -139,7 +139,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
@@ -147,7 +147,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;
@@ -175,7 +175,7 @@ class graphics_stuff
countPixel(_aImage, 0, 0, w, h, aCountNotWhite);
return aCountNotWhite.getCount();
}
-
+
public static int countNotBlackPixel(ImageHelper _aImage)
{
final int w = _aImage.getWidth();
@@ -192,8 +192,8 @@ class graphics_stuff
public class PixelCounter {
// private Image m_aImage;
// ImageHelper m_aImage;
-
-
+
+
public int countNotWhitePixel(String _sFile)
throws java.io.IOException
{
@@ -209,14 +209,14 @@ public class PixelCounter {
final int nw = graphics_stuff.countNotBlackPixel(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
{
@@ -243,5 +243,5 @@ public class PixelCounter {
// */
// }
}
-
+