User Tools

Site Tools


notes:cprog:spring2024:projects:gtf0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
notes:cprog:spring2024:projects:gtf0 [2024/02/08 03:45] – [RUN THE PROGRAM] hcopp1notes:cprog:spring2024:projects:gtf0 [2024/02/08 04:20] (current) – [VIEW THE IMAGE] hcopp1
Line 22: Line 22:
 If you execute this command it should produce a .png image If you execute this command it should produce a .png image
 =====VIEW THE IMAGE===== =====VIEW THE IMAGE=====
 +
 +The image can either be viewed, if on a Pi, from the GUI file explorer
 +
 +Or if in lab46:
 +1. Copy the file to ~/public_html/
 +   
 +<code>username@lab46:~/src/spring2024/gtf0$ cp ./gft0.png ~/public_html</code>
 +     
 +2. Change current directory to ~/public_html 
 +   
 +<code>cd ~/public_html</code>
 +     
 +3. Change permissions to be able to be read by all
 +   
 +<code>chmod +r gtf0.png</code>
 +     
 +4.view image from web browser
 +   
 +<code>https://lab46.g7n.org/~username/gtf0.png</code>
 =====LIBGD FUNCTIONALITY===== =====LIBGD FUNCTIONALITY=====
  
Line 31: Line 50:
 <code>                         image  red   green blue <code>                         image  red   green blue
 black = gdColorAllocate (image, 0x00, 0x00, 0x00);</code> black = gdColorAllocate (image, 0x00, 0x00, 0x00);</code>
 +
 +''red  green  blue'' sections are in hexcode so the most intense value is ''0xFF'' and the least being ''0x00'' 
 +
 +so if <color #ed1c24>red</color> and <color #00a2e8>blue</color> = ''0xFF'' 
 +
 +and <color #22b14c>green</color> = ''0x00'' 
 +
 +you will get <color #c8bfe7>purple</color> 
 +
 +
 ====DRAWING A LINE====  ====DRAWING A LINE==== 
  
notes/cprog/spring2024/projects/gtf0.1707363931.txt.gz · Last modified: 2024/02/08 03:45 by hcopp1