Find Jobs
Hire Freelancers

Createing a image file with C.

$15-20 USD

Chiuso
Pubblicato circa 20 anni fa

$15-20 USD

Pagato al completamento
You are to implement an array that holds a color image. The image has 640x480 pixels (dots), so you’ll need a 2-dimensional array. Each pixel has three colors, Red-Green-Blue. The values for each color is an integer between 0 and 255. This means that you will need to use an array of struct’s to hold the data. This means that were you to set the pixel at 0,0 in the image to black, you would need to use the following code: myimage[0][0].red = 0; myimage[0][0].green = 0; myimage[0][0].blue = 0; Using the rand() library function in C, you will fill your image with data. That is, starting at (0,0) and going row-by-row, you will call rand() to set each pixel’s red/green/blue values. For example, you might do something like: myimage[x][y].red = rand() % 256; myimage[x][y].green = rand() % 256; myimage[x][y].blue = rand() % 256; Since rand() returns a number much larger than 255, you will need to use the “%?? operator to scale the number as was done above. The variables x and y would be loop variables where 0 <= x <= 639 and 0 <= y <= 479. The image array should fill in all the values for each “x?? row before moving to the next value of “y??. Your program will be required to create a file (the filename should be passed as a parameter to the program) that will then contain the values in your image. You will write out the values in the image in the same order that they were filled in, starting at (0,0) and writing out through (639,0) without carriage returns/newlines. Then, at the end of a row, you should print out a newline and move to the next row, starting at (0,1) and going through (639,1). This repeats until you finish printing with pixel (639,479). ## Deliverables 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement). ## Platform The program must be written in C. Programs must run under unix GCC (GNU C). The program will run on a Sun Workstation. DO NOT USE AIX.
Rif. progetto: 3114181

Info sul progetto

11 proposte
Progetto a distanza
Attivo 20 anni fa

Hai voglia di guadagnare un po'?

I vantaggi delle offerte su Freelancer

Imposta il tuo budget e le scadenze
Fatti pagare per il lavoro svolto
Delinea la tua proposta
La registrazione e le offerte sui lavori sono gratuite
11 freelance hanno fatto un'offerta media di $11 USD
Avatar dell'utente
See private message.
$17 USD in 10 giorni
4,4 (55 valutazioni)
6,2
6,2
Avatar dell'utente
See private message.
$10,20 USD in 10 giorni
5,0 (52 valutazioni)
4,9
4,9
Avatar dell'utente
See private message.
$15,30 USD in 10 giorni
4,9 (41 valutazioni)
4,6
4,6
Avatar dell'utente
See private message.
$8,50 USD in 10 giorni
5,0 (52 valutazioni)
4,3
4,3
Avatar dell'utente
See private message.
$12,75 USD in 10 giorni
4,9 (25 valutazioni)
4,0
4,0
Avatar dell'utente
See private message.
$10,20 USD in 10 giorni
4,5 (47 valutazioni)
3,7
3,7
Avatar dell'utente
See private message.
$8,50 USD in 10 giorni
5,0 (9 valutazioni)
3,1
3,1
Avatar dell'utente
See private message.
$6,80 USD in 10 giorni
5,0 (2 valutazioni)
0,6
0,6
Avatar dell'utente
See private message.
$17 USD in 10 giorni
0,0 (0 valutazioni)
0,0
0,0
Avatar dell'utente
See private message.
$4,25 USD in 10 giorni
0,0 (0 valutazioni)
0,0
0,0
Avatar dell'utente
See private message.
$6,80 USD in 10 giorni
0,0 (3 valutazioni)
0,0
0,0

Info sul cliente

Bandiera: UNITED STATES
Huntsville, United States
4,9
3
Membro dal feb 27, 2004

Verifica del cliente

Grazie! Ti abbiamo inviato tramite email il link per richiedere il tuo bonus gratuito.
Non è stato possibile inviarti l'email. Riprova per piacere.
di utenti registrati di lavori pubblicati
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Caricamento anteprima
Autorizzazione per la geolocalizzazione concessa.
La tua sessione è scaduta ed è stato effettuato il log out. Accedi nuovamente per piacere.