This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
notes:cprog:spring2024:projects:gtf0 [2024/02/08 03:45] – [RUN THE PROGRAM] basic explanation hcopp1 | notes:cprog:spring2024:projects:gtf0 [2024/02/08 04:20] (current) – [VIEW THE IMAGE] hcopp1 | ||
---|---|---|---|
Line 19: | Line 19: | ||
< | < | ||
Issue the command '' | Issue the command '' | ||
- | 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 ~/ | ||
+ | |||
+ | < | ||
+ | |||
+ | 2. Change current directory to ~/ | ||
+ | |||
+ | < | ||
+ | |||
+ | 3. Change permissions to be able to be read by all | ||
+ | |||
+ | < | ||
+ | |||
+ | 4.view image from web browser | ||
+ | |||
+ | < | ||
=====LIBGD FUNCTIONALITY===== | =====LIBGD FUNCTIONALITY===== | ||
Line 30: | Line 50: | ||
< | < | ||
black = gdColorAllocate (image, 0x00, 0x00, 0x00);</ | black = gdColorAllocate (image, 0x00, 0x00, 0x00);</ | ||
+ | |||
+ | '' | ||
+ | |||
+ | so if <color # | ||
+ | |||
+ | and <color # | ||
+ | |||
+ | you will get <color # | ||
+ | |||
+ | |||
====DRAWING A LINE==== | ====DRAWING A LINE==== | ||