Join Images Horizontally Your program should provide a function similar to the following to join two images horizontally
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Join Images Horizontally Your program should provide a function similar to the following to join two images horizontally
Flip Vertically Your program should provide a function similar to the following to flip an image vertically. void flipImagevert (char image[][100], Dimension d) Figure 5 shows two images joined horizontally together where the second image is a vertical flip of the first image (a copy of the original image was made before the flip operation). 6. /)))*- sobre \ (C*(( 7/1 1 1/ 7". Figure 5: An Image Flipped Vertically NB: Because characters are used to create the images, the flip operation does not result in a perfect flip of the original image. 7. Flip Horizontally Your program should provide a function similar to the following to flip an image horizontally. void flipImageHoriz (char inage[][100], Dimension d) Figure 6 shows two images joined horizontally together where the second image is a horizontal flip of the first image (a copy of the original image was made before the flip operation). TIL G 1.... - (CSC J-((!? TUL Figure 6: An I ---\\. L AIJ-(( VII( @@) 1/ 11/-- TAL 6: An Image Flipped Horizontally
main Function The files for the three images in Figure 1 are as follows: First image: Dog.txt Second image: Cat.txt Third image: Smurf.txt You must load the images from the files and display each of them. You must then create copies of the images and place a border around each copy as shown in Figure 2. The three images with the borders must then be displayed on the monitor. Next, write code to generate the output shown in Figures 3, 4, 5, and 6. Next, write code to load an image from the file, Elephant.txt. Display the image, perform a vertical flip of a copy of the image, and then join the two images horizontally. Display the joined image. You should get the output shown in Figure 7. nnh DA /=/ nnh Figure 7: Operations on Elephant Image DV
Finally, write code to create and display the image shown in Figure 8 as a single image. PINCE ()@ @ ))) [ 'C,0)(0)1 NIC. ) (-- _../ GI LITTL nnh D / `-') /_ _1 1 (CIē ē) / | \_T_/-( ( .'7/1 UJ 1/ || uo nnh Figure 8: Joining Four Images Together Programming Guidelines You can use the function headings given or you can write your own functions. What to Submit Submit Assignment4.cpp on or before the deadline date. No other file must be submitted. Insert your Student ID as a prefix to the filename, e.g., 816099999Assignment4.cpp.