<commit_before>/*******************************************************************************
 * This file is part of TERMINAL RECALL 
 * Copyright (c) 2012, 2013 <NAME>.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl.html
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the COPYING and CREDITS files for more details.
 * 
 * Contributors:
 *      chuck - initial API and implementation
 ******************************************************************************/
package org.jtrfp.trcl;

import java.awt.Color;

public class GammaCorrectingColorProcessor implements ColorProcessor
	{
	double GAMMA=1.2;
	public static final GammaCorrectingColorProcessor singleton = new GammaCorrectingColorProcessor();
	@Override
	public Color process(Color c)
		{
		return new Color(
				(int)(Math.pow((double)c.getRed()/256.,GAMMA)*256.),
				(int)(Math.pow((double)c.getGreen()/256.,GAMMA)*256.),
				(int)(Math.pow((double)c.getBlue()/256.,GAMMA)*256.));
		}//end process()

	}//end GammaCorrectingColorProcessor<commit_msg>Changed texture gamma to .9<commit_after>/*******************************************************************************
 * This file is part of TERMINAL RECALL 
 * Copyright (c) 2012, 2013 <NAME>.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl.html
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the COPYING and CREDITS files for more details.
 * 
 * Contributors:
 *      chuck - initial API and implementation
 ******************************************************************************/
package org.jtrfp.trcl;

import java.awt.Color;

public class GammaCorrectingColorProcessor implements ColorProcessor {
    double GAMMA = .9;
    public static final GammaCorrectingColorProcessor singleton = new GammaCorrectingColorProcessor();

    @Override
    public Color process(Color c) {
	return new Color(
		(int) (Math.pow((double) c.getRed() / 256., GAMMA) * 256.),
		(int) (Math.pow((double) c.getGreen() / 256., GAMMA) * 256.),
		(int) (Math.pow((double) c.getBlue() / 256., GAMMA) * 256.));
    }// end process()

}// end GammaCorrectingColorProcessor
{'fraction_non_alphanumeric': 0.20459518599562362, 'fraction_numerical': 0.02188183807439825, 'mean_word_length': 4.702702702702703, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4263515', 'n_tokens_mistral': 797, 'n_tokens_neox': 694, 'n_words': 257}