Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
2
<HTML>
3
<HEAD>
4
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1">
5
<LINK REL="Start" HREF="index.html">
6
<LINK REL="Contents" HREF="toc.html">
7
<LINK REL="Prev" HREF="919Rotatingthegraphs.html">
8
<LINK REL="Next" HREF="921Timingthegenerationofgraphs.html">
9
<STYLE TYPE="text/css"><!--
10
BODY { font-family: serif }
11
H1 { font-family: sans-serif }
12
H2 { font-family: sans-serif }
13
H3 { font-family: sans-serif }
14
H4 { font-family: sans-serif }
15
H5 { font-family: sans-serif }
16
H6 { font-family: sans-serif }
17
SUB { font-size: smaller }
18
SUP { font-size: smaller }
19
PRE { font-family: monospace }
20
A { text-decoration: none }
21
--></STYLE>
22
</HEAD>
23
<BODY>
24
<A HREF="toc.html">Contents</A>
25
<A HREF="919Rotatingthegraphs.html">Previous</A>
26
<A HREF="921Timingthegenerationofgraphs.html">Next</A>
27
<HR NOSHADE>
28
<H2><A NAME="9_20">9.20 Adjusting brightness and contrast for images and
29
 backgrounds</A></H2>
30
<P><STRONG> The following section only applies to palette images. This
31
 means it wont work on true-color images.</STRONG></P>
32
<P> It is often desirable to have a background image look a little bit
33
 &quot;washed&quot; out so it doesn't take the concentration away from the actual
34
 graph. There are basically two ways of accomplish this</P>
35
<OL>
36
<LI> Prepare the image with an external images editor to adjust the
37
 level of brightness and contrasty to a desirable level</LI>
38
<LI> Use JpGraph:s built in adjustment for contrast, brightness and
39
 color saturation.</LI>
40
</OL>
41
<P> To adjust the background image call The levels for both brightness
42
 and contrast are real numbers in the range [-1, 1] You can choose to
43
 adjust for example just the background image or you might also choose
44
 to adjust the whole image. To change the background image just use the
45
 method <A href="../ref/Graph.html#_GRAPH_ADJBACKGROUNDIMAGE">
46
 Graph::AdjBackgroundImage()</A> to specify a suitable value. Let's show
47
 some example on what we can do with this. The following example have
48
 been generated by using the small utility &quot;adjimg.php&quot; which you can
49
 find in the &quot;utils/&quot; directory.</P>
50
<P> <IMG alt="" border="0" HEIGHT="244"       src="img/img/img/img/img/img/imgadj_orig.jpg" WIDTH="246">
51
<BR> Brightness=0, contrast=0, saturation = -1 (Original image)</P>
52
<P> <IMG alt="" border="0" HEIGHT="244"       src="img/img/img/img/img/img/imgadj_b00c00sat-1.jpg" WIDTH="246">
53
<BR> Brightness=0, contrast=0, saturation = -1 (Black &amp; White image)</P>
54
<P> <IMG alt="" border="0" HEIGHT="244"       src="img/img/img/img/img/img/imgadj_b03c-03sat0.jpg" WIDTH="246">
55
<BR> Brightness=0.3, contrast=-0.3, saturation=0</P>
56
<P> <IMG alt="" border="0" HEIGHT="244"       src="img/img/img/img/img/img/imgadj_b04c-07sat0.jpg" WIDTH="246">
57
<BR> Brightness=0.4, contrast=-0.7, saturation=0</P>
58
<P> <IMG alt="" border="0" HEIGHT="244"       src="img/img/img/img/img/img/imgadj_b04c-07sat-1.jpg" WIDTH="246">
59
<BR> Brightness=0.4, contrast=-0.7, saturation=-1</P>
60
<P> <IMG alt="" border="0" HEIGHT="244"       src="img/img/img/img/img/img/imgadj_b0c0sat1.jpg" WIDTH="246">
61
<BR> Brightness=0, contrast=0, saturation=1</P>
62
<HR NOSHADE>
63
<A HREF="toc.html">Contents</A>
64
<A HREF="919Rotatingthegraphs.html">Previous</A>
65
<A HREF="921Timingthegenerationofgraphs.html">Next</A>
66
</BODY>
67
</HTML>