Need help with your Discussion

Get a timely done, PLAGIARISM-FREE paper
from our highly-qualified writers!

glass
pen
clip
papers
heaphones

FIU C Programming Question

FIU C Programming Question

FIU C Programming Question

Description

Assignment #2 Instructions: BMP Image Processing

Through this programming assignment, the students will learn to do the following:

  1. Learn to read and write binary files.
  2. Gain more experience with using pointers.
  3. Gain more experience with dynamic memory allocation and deallocation.

In this assignment, you are asked to manipulate an image from a 24-bit uncompressed bmp file. (The format of bmp files is given in http://en.wikipedia.org/wiki/BMP_file_format). To help with reading and writing the image file, you are given library functions and an example that deal with the bmp file (in a zip file). In the example, the image is flipped horizontally. You are asked to implement some additional functions including the verticalflip(), enlarge() and rotate() functions: the first flips the image vertically, the second is used to enlarge the image by an integer scale factor of 2 or 3; the last one is used to rotate the image either clockwise or counter-clockwise by a multiple of 90 degrees. 

The program should take the following command-line options:

% bmptool [-f | -r degrees |-s scale| -v ] [-o output_file] [input_file]

Where -s means to scale the image by a scale factor of 2 or 3 as indicated on the command line with a 2 or a 3, -r means to rotate the image by a multiple of 90 degrees clockwise if positive or counter-clockwise if negative, -v means to flip the image vertically and -f means to flip the image horizontally. You can assume for each type (-s, -r, -f, or -v), the command line has at most one option, but that should not affect your code. Only implement each one one time no matter how many times it is included. However, the user may present a combination, say, ‘bmptool -r -s -f -v’. If multiple option types are present, the order for processing the image is that you do scale first, then rotate, and then flip vertically and finally flip horizontally.

You are required to use getopt() to process the command-line. If ‘-o output_file’ is missing, use standard output. If ‘input_file’ is missing, use standard input. The options to use standard input or standard output will only be used when chaining commands. Make sure the program returns 0 on success. In that case, one can ‘chain’ the commands using pipes, like:

% bmptool -s 2 1.bmp | bmptool -r 90 | bmptool -f -o 2.bmp

Your program needs to provide necessary sanity-check for command line arguments and handle various error conditions and prompt the user with helpful information. You need to use getopt() to process the command line arguments. Test your program with various combinations to make sure it works as expected. You must use dynamic memory to store the content of the new image before writing out to file. You need to reclaim memory afterwards to prevent memory leaks. Please submit your work through Canvas as one zip file called FirstnameLastnameA2.zip. Follow the instructions below carefully (to avoid unnecessary loss of grade). Include your source code, your Makefile, the bmplib files that I have provided, and the example.bmp file in the zip file. I should be able to create the executable by typing ‘make’. The Makefile should also contain a ‘clean’ target for cleaning up the directory (removing all object files). Make sure you don’t include intermediate files: *.o, executables, *~, etc., in your submission. (There’ll be a penalty for including unnecessary intermediate files).

Please make sure you submit homework before the deadline. There will be a late penalty as per the syllabus.

If the program does not compile and do something useful when it runs it will not earn any credit.

bmplib Download bmplib(Zip file) – files needed to complete this assignment.

Bitmap Assignment 2 Rubric Spring 2022

Bitmap Assignment 2 Rubric Spring 2022

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now

Our Service Charter


1. Professional & Expert Writers: Eminence Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Eminence Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Eminence Papers are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Eminence Papers, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

We Can Write It for You! Enjoy 20% OFF on This Order. Use Code SAVE20

Stuck with your Assignment?

Enjoy 20% OFF Today
Use code SAVE20