Codebase list pxljr / 280192e6-d3b2-4100-ac67-dabdde4b153d/main gs-gamma.ps
280192e6-d3b2-4100-ac67-dabdde4b153d/main

Tree @280192e6-d3b2-4100-ac67-dabdde4b153d/main (Download .tar.gz)

gs-gamma.ps @280192e6-d3b2-4100-ac67-dabdde4b153d/mainraw · history · blame

%!PS-Adobe-3.0

%% Copyright (c) 2005 Hin-Tak Leung. All rights reserved.

%%
%%    This program is free software; you can redistribute it and/or modify
%%    it under the terms of the GNU General Public License as published by
%%    the Free Software Foundation; either version 2 of the License, or
%%    (at your option) any later version.
%%
%%    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, write to the Free Software
%%    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
%%

%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
%% EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
%% MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
%% NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
%% BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
%% ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
%% CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
%% SOFTWARE.

% (1 - x)**8 * x**0.7  + x
{ dup dup	
	1 exch sub	
	8 exp
	exch
	0.7 exp
    mul
add }
{ dup dup	
	1 exch sub	
	8 exp
	exch
	0.7 exp
    mul
add }
{ dup dup	
	1 exch sub	
	8 exp
	exch
	0.7 exp
    mul
add }
{ dup dup	
	1 exch sub	
	8 exp
	exch
	0.7 exp
    mul
add }
setcolortransfer