Find Jobs
Hire Freelancers

Createing a image file with C.

$15-20 USD

Ditutup
Disiarkan sekitar 20 tahun yang lalu

$15-20 USD

Dibayar semasa penghantaran
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.
ID Projek: 3114181

Tentang projek

11 cadangan
Projek jarak jauh
Aktif 20 tahun yang lalu

Ingin menjana wang?

Faedah membida di Freelancer

Tetapkan bajet dan garis masa anda
Dapatkan bayaran untuk kerja anda
Tuliskan cadangan anda
Ianya percuma untuk mendaftar dan membida pekerjaan
11 pekerja bebas membida secara purata $11 USD untuk pekerjaan ini
Avatar Pengguna
See private message.
$17 USD dalam 10 hari
4.4 (55 ulasan)
6.2
6.2
Avatar Pengguna
See private message.
$10.20 USD dalam 10 hari
5.0 (52 ulasan)
4.9
4.9
Avatar Pengguna
See private message.
$15.30 USD dalam 10 hari
4.9 (41 ulasan)
4.6
4.6
Avatar Pengguna
See private message.
$8.50 USD dalam 10 hari
5.0 (52 ulasan)
4.3
4.3
Avatar Pengguna
See private message.
$12.75 USD dalam 10 hari
4.9 (25 ulasan)
4.0
4.0
Avatar Pengguna
See private message.
$10.20 USD dalam 10 hari
4.5 (47 ulasan)
3.7
3.7
Avatar Pengguna
See private message.
$8.50 USD dalam 10 hari
5.0 (9 ulasan)
3.1
3.1
Avatar Pengguna
See private message.
$6.80 USD dalam 10 hari
5.0 (2 ulasan)
0.6
0.6
Avatar Pengguna
See private message.
$17 USD dalam 10 hari
0.0 (0 ulasan)
0.0
0.0
Avatar Pengguna
See private message.
$4.25 USD dalam 10 hari
0.0 (0 ulasan)
0.0
0.0
Avatar Pengguna
See private message.
$6.80 USD dalam 10 hari
0.0 (3 ulasan)
0.0
0.0

Tentang klien

Bendera UNITED STATES
Huntsville, United States
4.9
3
Ahli sejak Feb 27, 2004

Pengesahan Klien

Terima kasih! Kami telah menghantar pautan melalui e-mel kepada anda untuk menuntut kredit percuma anda.
Sesuatu telah berlaku semasa menghantar e-mel anda. Sila cuba lagi.
Pengguna Berdaftar Jumlah Pekerjaan Disiarkan
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Memuatkan pratonton
Kebenaran diberikan untuk Geolocation.
Sesi log masuk anda telah luput dan telah dilog keluar. Sila log masuk sekali lagi.