pike.git/
src/
modules/
Image/
colors.c
Branch:
Tag:
Non-build tags
All tags
No tags
2001-01-04
2001-01-04 16:18:26 by Mirar (Pontus Hagland) <pike@sort.mirar.org>
f7f93a2516738d403f96f01c773e6848687e2443 (
11
lines) (+
7
/-
4
)
[
Show
|
Annotate
]
Branch:
7.9
grey100 is white, not grey99
Rev: src/modules/Image/colors.c:1.44
1:
/* **! module Image **! note
-
**! $Id: colors.c,v 1.
43
2001/01/
03
18:
08:07
mirar Exp $
+
**! $Id: colors.c,v 1.
44
2001/01/
04
16:
18:
26
mirar Exp $
**! submodule Color **! **! This module keeps names and easy handling
179:
#include "global.h"
-
RCSID("$Id: colors.c,v 1.
43
2001/01/
03
18:
08:07
mirar Exp $");
+
RCSID("$Id: colors.c,v 1.
44
2001/01/
04
16:
18:
26
mirar Exp $");
#include "image_machine.h"
1361:
{ /* greyx; x=0..99 */ stack_dup();
-
push_text("
grey
%f\n");
+
push_text("
gr
%
*[ea]y%
f\n");
f_sscanf(2); if (sp[-1].type==T_ARRAY && sp[-1].u.array->size==1)
1369:
double f; f = sp[-1].u.array->item[0].u.float_number; pop_stack();
-
push_int( (int)(255*f/
99
) );
+
pop_stack();
+
push_int( (int)(255*f/
100
) );
+
/* grey100 is white, grey0 is black */
stack_dup(); stack_dup(); image_make_rgb_color(3);