Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with this project, It is done in C. CS 100 Project Five - Spring 2018 1. Overview: This program manipulates pictures (image

I need help with this project, It is done in C.

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

CS 100 Project Five - Spring 2018 1. Overview: This program manipulates pictures (image files). Specifically, it takes an existing image and creates a new image This new image can be flipped or rotated or inverted or a simple copy of the original imagc. ackground Information on PPM files Pictures can be stored in many formats. You've probably heard of the more common ones, such as jpeg (from thoe Joint Photographic Experts Group) and gif (Graphics Interchange Format). The vast majority of these formats store the image data in a binary file. There is one format, ppm (portable pixmap) that uses ASCIl files to store an image. These ppm files consist of header information and then a long string of numbers representing the red, green and blue components of each pixel in the image. It is not widely used. Since the images are stored in ASCII, they are much larger than other (binary) formats. However, as these files are (readable) ASCll data, they are a good format for an introductory programming class. The ppm format that is used for this project is shown at the right. The very first line is always P3 After that, you have three pixel-2-1-red pixel-2-1-green pixel-2-1-blue pixel-2-2-red pixel-2-2-green pixel-2-2-blue... values (width, height, colors) that can be on a single line or separate lines. Finally, you have the actual RGB values (three integers) for each pixel in the image. A very tiny ppm file that is four pixels wide and six pixels tall, with the top two rows the color red, the middle two rows the color green, and the bottom two rows the color blue, is shown at the right below. P3 width-in-pixels height-in-pixels maximum-color-value pixel-1-1-red pixel-1-1-green pixel-1-1-blue pixel-1-2-red pixel-1-2-green pixel-1-2-blue pixel N-1-red pixel-N-1-green pixel-N-1-blue pixel-N-2-red pixel-N-2-green pixel-N-2-blue.. n order to see if your4 6 255 This program will be manipulating ppm image files. I program is working properly, you nced to be able to view thesc images. Your system might (or might not) have a viewer that supports ppm images.25500 255 00 255 00 255 00 If not, then download the free program GIMP (GNU Image Manipulation0255 0 0 255 0 0255 0 0255 Program). Download GIMP at http://www.gimp.org/downloads 255 00 255 0 0 255 00 255 00 0 255 0 00 255 00 255 0255 0 00255 00 255 02550 00 255 00 255 0255 0 00 255 00 255 You can use GIMP to convert additional pictures into ppm format for testing if you wish. Simply load an existing image that you have into GIMP and then sclect the "Export As" option and a file type of PPM imagc. Make sure to click ASCII when asked how to export. When you use ppm to convert an image into a ppm file, it puts a comment on the second line. You need to delete that comment line, as our program does not handle comments in ppm files. As mentioned previously, this project manipulates image files. The specific manipulations implemented are: 1. duplicate (duplicates/copies an image) 2. invert (negate the image) 3. flipHorizontal (flip the image from left to right) 4. flipVertical (flip the image from top to bottom) 5. rotateleft (rotate the image counter-clockwise by 90 degrees) 6. rotateRight (rotate the image clockwise by 90 degrees) CS 100 Project Five - Spring 2018 1. Overview: This program manipulates pictures (image files). Specifically, it takes an existing image and creates a new image This new image can be flipped or rotated or inverted or a simple copy of the original imagc. ackground Information on PPM files Pictures can be stored in many formats. You've probably heard of the more common ones, such as jpeg (from thoe Joint Photographic Experts Group) and gif (Graphics Interchange Format). The vast majority of these formats store the image data in a binary file. There is one format, ppm (portable pixmap) that uses ASCIl files to store an image. These ppm files consist of header information and then a long string of numbers representing the red, green and blue components of each pixel in the image. It is not widely used. Since the images are stored in ASCII, they are much larger than other (binary) formats. However, as these files are (readable) ASCll data, they are a good format for an introductory programming class. The ppm format that is used for this project is shown at the right. The very first line is always P3 After that, you have three pixel-2-1-red pixel-2-1-green pixel-2-1-blue pixel-2-2-red pixel-2-2-green pixel-2-2-blue... values (width, height, colors) that can be on a single line or separate lines. Finally, you have the actual RGB values (three integers) for each pixel in the image. A very tiny ppm file that is four pixels wide and six pixels tall, with the top two rows the color red, the middle two rows the color green, and the bottom two rows the color blue, is shown at the right below. P3 width-in-pixels height-in-pixels maximum-color-value pixel-1-1-red pixel-1-1-green pixel-1-1-blue pixel-1-2-red pixel-1-2-green pixel-1-2-blue pixel N-1-red pixel-N-1-green pixel-N-1-blue pixel-N-2-red pixel-N-2-green pixel-N-2-blue.. n order to see if your4 6 255 This program will be manipulating ppm image files. I program is working properly, you nced to be able to view thesc images. Your system might (or might not) have a viewer that supports ppm images.25500 255 00 255 00 255 00 If not, then download the free program GIMP (GNU Image Manipulation0255 0 0 255 0 0255 0 0255 Program). Download GIMP at http://www.gimp.org/downloads 255 00 255 0 0 255 00 255 00 0 255 0 00 255 00 255 0255 0 00255 00 255 02550 00 255 00 255 0255 0 00 255 00 255 You can use GIMP to convert additional pictures into ppm format for testing if you wish. Simply load an existing image that you have into GIMP and then sclect the "Export As" option and a file type of PPM imagc. Make sure to click ASCII when asked how to export. When you use ppm to convert an image into a ppm file, it puts a comment on the second line. You need to delete that comment line, as our program does not handle comments in ppm files. As mentioned previously, this project manipulates image files. The specific manipulations implemented are: 1. duplicate (duplicates/copies an image) 2. invert (negate the image) 3. flipHorizontal (flip the image from left to right) 4. flipVertical (flip the image from top to bottom) 5. rotateleft (rotate the image counter-clockwise by 90 degrees) 6. rotateRight (rotate the image clockwise by 90 degrees)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo, Susan D. Urban, Karen C. Davis

4th Edition

1284231585, 978-1284231588

More Books

Students also viewed these Databases questions

Question

25.0 m C B A 52.0 m 65.0 m

Answered: 1 week ago

Question

Describe the options and trends in management education

Answered: 1 week ago