/*
- * Imagesqueeze - Image codec optimized for photos.
- * Copyright (C) 2012, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
- *
+ * Imagesqueeze - Image codec. Copyright ©2012-2019, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ *
* This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public License
- * as published by the Free Software Foundation.
+ * modify it under the terms of version 3 of the GNU Lesser General Public License
+ * or later as published by the Free Software Foundation.
*/
package eu.svjatoslav.imagesqueeze.codec;
-public class ColorStats {
+class ColorStats {
- int ySum;
- int uSum;
- int vSum;
+ int ySum;
+ int uSum;
+ int vSum;
- int pixelCount;
+ int pixelCount;
- public ColorStats() {
- reset();
- }
+ public ColorStats() {
+ reset();
+ }
- public int getAverageU() {
- return uSum / pixelCount;
- }
+ public int getAverageU() {
+ return uSum / pixelCount;
+ }
- public int getAverageV() {
- return vSum / pixelCount;
- }
+ public int getAverageV() {
+ return vSum / pixelCount;
+ }
- public int getAverageY() {
- return ySum / pixelCount;
- }
+ public int getAverageY() {
+ return ySum / pixelCount;
+ }
- public void reset() {
- ySum = 0;
- uSum = 0;
- vSum = 0;
- pixelCount = 0;
- }
+ public void reset() {
+ ySum = 0;
+ uSum = 0;
+ vSum = 0;
+ pixelCount = 0;
+ }
}