Find Jobs
Hire Freelancers

Createing a image file with C.

$15-20 USD

Closed
Posted about 20 years ago

$15-20 USD

Paid on delivery
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.
Project ID: 3114181

About the project

11 proposals
Remote project
Active 20 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
11 freelancers are bidding on average $11 USD for this job
User Avatar
See private message.
$17 USD in 10 days
4.4 (55 reviews)
6.2
6.2
User Avatar
See private message.
$10.20 USD in 10 days
5.0 (52 reviews)
4.9
4.9
User Avatar
See private message.
$15.30 USD in 10 days
4.9 (41 reviews)
4.6
4.6
User Avatar
See private message.
$8.50 USD in 10 days
5.0 (52 reviews)
4.3
4.3
User Avatar
See private message.
$12.75 USD in 10 days
4.9 (25 reviews)
4.0
4.0
User Avatar
See private message.
$10.20 USD in 10 days
4.5 (47 reviews)
3.7
3.7
User Avatar
See private message.
$8.50 USD in 10 days
5.0 (9 reviews)
3.1
3.1
User Avatar
See private message.
$6.80 USD in 10 days
5.0 (2 reviews)
0.6
0.6
User Avatar
See private message.
$17 USD in 10 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$4.25 USD in 10 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$6.80 USD in 10 days
0.0 (3 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Huntsville, United States
4.9
3
Member since Feb 27, 2004

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.