1 /* $Id$ */ 2 /* 3 * Copyright (c) 1990-1996 Sam Leffler 4 * Copyright (c) 1991-1996 Silicon Graphics, Inc. 5 * HylaFAX is a trademark of Silicon Graphics 6 * HylaFAX is a trademark of Silicon Graphics 7 * 8 * Permission to use, copy, modify, distribute, and sell this software and 9 * its documentation for any purpose is hereby granted without fee, provided 10 * that (i) the above copyright notices and this permission notice appear in 11 * all copies of the software and related documentation, and (ii) the names of 12 * Sam Leffler and Silicon Graphics may not be used in any advertising or 13 * publicity relating to the software without the specific, prior written 14 * permission of Sam Leffler and Silicon Graphics. 15 * 16 * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 17 * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 18 * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 19 * 20 * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR 21 * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, 22 * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 23 * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 24 * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 25 * OF THIS SOFTWARE. 26 */ 27 #ifndef LUMDEF 28 #define LUMDEF 29 30 #define RLUM (0.3086) 31 #define GLUM (0.6094) 32 #define BLUM (0.0820) 33 34 #define _RED (79) 35 #define _GREEN (156) 36 #define _BLUE (21) 37 38 #ifdef OLDWAY 39 #define RLUM (0.299) 40 #define GLUM (0.587) 41 #define BLUM (0.114) 42 43 #define _RED (77) 44 #define _GREEN (150) 45 #define _BLUE (29) 46 #endif 47 48 #define ILUM(r,g,b) ((_RILUM*(r)+_GILUM*(g)+_BILUM*(b))>>8) 49 #define LUM(r,g,b) (RLUM*(r)+GLUM*(g)+BLUM*(b)) 50 51 extern int _RILUM, _GILUM, _BILUM; 52 53 #endif /* LUMDEF */ 54