Extensions/ImageGlass.Core/ImgFilter.cs
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
* imaeg - generic image utility in C#
* Copyright (C) 2010 ed <tripflag@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License v2
* (version 2) as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, refer to the following URL:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Drawing.Imaging;
namespace ImageGlass.Core
{
public class ImgFilter
{
int rotate;
bool changed;
float _brigh, _contr, _gamma;
public const float DEFAULT_BRIGH = 0f; // [-1..+1] where higher = brighter
public const float DEFAULT_CONTR = 1f; // [ 0..n ] where higher = stronger
public const float DEFAULT_GAMMA = 1f; // [ 0..n ] where higher = darker
public ImgFilter()
{
rotate = 0;
_brigh = DEFAULT_BRIGH;
_contr = DEFAULT_CONTR;
_gamma = DEFAULT_GAMMA;
}
public bool HasChanged()
{
bool ret = changed;
changed = false;
return ret;
}
public void IncRotate(int i)
{
int oldrot = rotate;
rotate += i;
if (rotate < 0) rotate = 3;
if (rotate > 3) rotate = 0;
if (oldrot != rotate)
changed = true;
}
后面还有 99 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。