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="311VerifyingthatyouhavetheGDlibraryinstalled.html"><LINK REL="Next" HREF="313PreparingTrueTypeFontFiles.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="311VerifyingthatyouhavetheGDlibraryinstalled.html">Previous</A><A HREF="313PreparingTrueTypeFontFiles.html">Next</A><HR NOSHADE><H3><A NAME="3_1_2">3.1.2 Verifying that you have GD2 installed</A></H3><P> To access the more advanced features of JpGraph needs the GD 2.xlibrary. This will allow the use of features such as alpha-blending andtrucolor images.</P><P> The GD 2.x library is included in all standard PHP versions from4.2.x and above. To make sure that the GD 2.x library is installed thefollowing script must be working.<DIV class="phpscript"><CODE><FONT color="#000000"><FONT color="#0000BB"> $im </FONT><FONT color="#007700">= </FONT><FONT color="#0000BB">imagecreatetruecolor </FONT><FONT color="#007700">(</FONT><FONT color="#0000BB">300</FONT><FONT color="#007700">, </FONT><FONT color="#0000BB">200</FONT><FONTcolor="#007700">); <BR></FONT><FONT color="#0000BB">$black </FONT><FONT color="#007700">= </FONT><FONTcolor="#0000BB">imagecolorallocate </FONT><FONT color="#007700">(</FONT><FONTcolor="#0000BB">$im</FONT><FONT color="#007700">, </FONT><FONT color="#0000BB">0</FONT><FONT color="#007700">, </FONT><FONT color="#0000BB">0</FONT><FONTcolor="#007700">, </FONT><FONT color="#0000BB">0</FONT><FONT color="#007700">); <BR></FONT><FONT color="#0000BB">$white </FONT><FONT color="#007700">= </FONT><FONTcolor="#0000BB">imagecolorallocate </FONT><FONT color="#007700">(</FONT><FONTcolor="#0000BB">$im</FONT><FONT color="#007700">, </FONT><FONT color="#0000BB">255</FONT><FONT color="#007700">, </FONT><FONT color="#0000BB">255</FONT><FONTcolor="#007700">, </FONT><FONT color="#0000BB">255</FONT><FONT color="#007700">); <BR><BR></FONT><FONT color="#0000BB">imagefilledrectangle</FONT><FONT color="#007700">(</FONT><FONT color="#0000BB">$im</FONT><FONT color="#007700">,</FONT><FONTcolor="#0000BB">0</FONT><FONT color="#007700">,</FONT><FONT color="#0000BB">0</FONT><FONT color="#007700">,</FONT><FONT color="#0000BB">399</FONT><FONTcolor="#007700">,</FONT><FONT color="#0000BB">99</FONT><FONT color="#007700">,</FONT><FONT color="#0000BB">$white</FONT><FONT color="#007700">); <BR></FONT><FONT color="#0000BB">imagerectangle</FONT><FONT color="#007700">(</FONT><FONT color="#0000BB">$im</FONT><FONT color="#007700">,</FONT><FONTcolor="#0000BB">20</FONT><FONT color="#007700">,</FONT><FONT color="#0000BB">20</FONT><FONT color="#007700">,</FONT><FONT color="#0000BB">250</FONT><FONTcolor="#007700">,</FONT><FONT color="#0000BB">190</FONT><FONT color="#007700">,</FONT><FONT color="#0000BB">$black</FONT><FONT color="#007700">); <BR><BR></FONT><FONT color="#0000BB">header </FONT><FONT color="#007700">(</FONT><FONTcolor="#DD0000">"Content-type: image/png"</FONT><FONT color="#007700">); <BR></FONT><FONT color="#0000BB">imagepng </FONT><FONT color="#007700">(</FONT><FONTcolor="#0000BB">$im</FONT><FONT color="#007700">);</FONT><FONT color="#0000BB"></FONT></FONT></CODE></DIV></P><P> After running this script you should now see a black rectangle inyour browser.</P><HR NOSHADE><A HREF="toc.html">Contents</A><A HREF="311VerifyingthatyouhavetheGDlibraryinstalled.html">Previous</A><A HREF="313PreparingTrueTypeFontFiles.html">Next</A></BODY></HTML>