Blame | Letzte Änderung | Log anzeigen | RSS feed
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"><HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1"><LINK REL="Start" HREF="index.html"><LINK REL="Contents" HREF="toc.html"><LINK REL="Prev" HREF="1019Rotatingthegraphs.html"><LINK REL="Next" HREF="1021Timingthegenerationofgraphs.html"><STYLE TYPE="text/css"><!--BODY { font-family: serif }H1 { font-family: sans-serif }H2 { font-family: sans-serif }H3 { font-family: sans-serif }H4 { font-family: sans-serif }H5 { font-family: sans-serif }H6 { font-family: sans-serif }SUB { font-size: smaller }SUP { font-size: smaller }PRE { font-family: monospace }A { text-decoration: none }--></STYLE></HEAD><BODY><A HREF="toc.html">Contents</A><A HREF="1019Rotatingthegraphs.html">Previous</A><A HREF="1021Timingthegenerationofgraphs.html">Next</A><HR NOSHADE><H2><A NAME="10_20">10.20 Adjusting brightness and contrast for imagesand backgrounds</A></H2><P><STRONG> The following section only applies to palette images. Thismeans it wont work on true-color images.</STRONG></P><P> It is often desirable to have a background image look a little bit"washed" out so it doesn't take the concentration away from the actualgraph. There are basically two ways of accomplish this</P><OL><LI> Prepare the image with an external images editor to adjust thelevel of brightness and contrasty to a desirable level</LI><LI> Use JpGraph:s built in adjustment for contrast, brightness andcolor saturation.</LI></OL><P> To adjust the background image call The levels for both brightnessand contrast are real numbers in the range [-1, 1] You can choose toadjust for example just the background image or you might also chooseto adjust the whole image. To change the background image just use themethod <A href="../ref/Graph.html#_GRAPH_ADJBACKGROUNDIMAGE">Graph::AdjBackgroundImage()</A> to specify a suitable value. Let's showsome example on what we can do with this. The following example havebeen generated by using the small utility "adjimg.php" which you canfind in the "utils/" directory.</P><P> <IMG alt="" border="0" HEIGHT="244" src="img/imgadj_orig.jpg" WIDTH="246"><BR> Brightness=0, contrast=0, saturation = -1 (Original image)</P><P> <IMG alt="" border="0" HEIGHT="244" src="img/imgadj_b00c00sat-1.jpg" WIDTH="246"><BR> Brightness=0, contrast=0, saturation = -1 (Black & White image)</P><P> <IMG alt="" border="0" HEIGHT="244" src="img/imgadj_b03c-03sat0.jpg" WIDTH="246"><BR> Brightness=0.3, contrast=-0.3, saturation=0</P><P> <IMG alt="" border="0" HEIGHT="244" src="img/imgadj_b04c-07sat0.jpg" WIDTH="246"><BR> Brightness=0.4, contrast=-0.7, saturation=0</P><P> <IMG alt="" border="0" HEIGHT="244" src="img/imgadj_b04c-07sat-1.jpg" WIDTH="246"><BR> Brightness=0.4, contrast=-0.7, saturation=-1</P><P> <IMG alt="" border="0" HEIGHT="244" src="img/imgadj_b0c0sat1.jpg" WIDTH="246"><BR> Brightness=0, contrast=0, saturation=1</P><HR NOSHADE><A HREF="toc.html">Contents</A><A HREF="1019Rotatingthegraphs.html">Previous</A><A HREF="1021Timingthegenerationofgraphs.html">Next</A></BODY></HTML>