Find Jobs
Hire Freelancers

create a 8bit bmp image using C

$10-30 USD

In Progress
Posted over 8 years ago

$10-30 USD

Paid on delivery
a) Copy your file [login to view URL] to red_8bit_image.cpp. b) Make [login to view URL] so that it writes out a BMP image file using 8-bits per pixel and a colortable consisting of the red "colors" from 0 for black to 255 for brightest red. Note: You must modify the BITMAPINFOHEADER. A 24-bit BMP image does not have a color table, but your 8-bit BMP files will have a colortable. Therefore, in red_8b it_image.c, you will need to write out a color table at the appropriate place in the output file. You will do this by mallocating a colortable vector containing 256 RGB quads. In your colortable for "red colors", the RGBquad bytes for blue=0, green=0, and red will take values from 0 through 255. Finally, you will write out one-byte per pixel to the output file. Steps: 1) Modify the BITMAPINFOHEADER to indicate an 8-bit BMP image. 2) Modify the rowsize to 4*int(width+3/4) 3) Make sure the imagedata is mallocated to be the correct size to accomodate 1-byte per pel imagedata =(unsigned char *)malloc(rowsize*height*sizeof(unsigned char)); 4) Mallocate an unsigned vector to hold the colortable RGB Quads colortable =(unsigned char *)malloc(4*256*sizeof(unsigned char)); 5) Assign the correct byte-value to each of the RGB values in the colortable RGBquads vector . 6) Make sure the filesize and offset to image data values in the BMP file header reflect the presence of the colortable and the use of 1byte per pixel. 7) Write out the colortable after the header(at the appropriate place in the output file). 8) Is there anything else you need to change in the program?
Project ID: 8611370

About the project

1 proposal
Remote project
Active 9 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
1 freelancer is bidding on average $30 USD for this job
User Avatar
Hello... I know how to do it...22 years working with bitmap files... I have my own code to write on any format( 32 bits, 24 bits, 8 bits, 4 bits, 2 bits, 1 bits ) ... So, I can follow your instructions... Be sure that I can do it. I have a master and PhD in digital imagen processing...I must be the best option to you. The code would be perfect...zero bugs. Best regards!...
$30 USD in 3 days
5.0 (125 reviews)
7.3
7.3

About the client

Flag of UNITED STATES
Fairborn, United States
1.6
1
Member since Jul 11, 2014

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.