/* * Imagesqueeze - Image codec optimized for photos. * Copyright (C) 2012, 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. */ package eu.svjatoslav.imagesqueeze.codec; public class ColorStats { int ySum; int uSum; int vSum; int pixelCount; public ColorStats() { reset(); } public int getAverageU() { return uSum / pixelCount; } public int getAverageV() { return vSum / pixelCount; } public int getAverageY() { return ySum / pixelCount; } public void reset() { ySum = 0; uSum = 0; vSum = 0; pixelCount = 0; } }