Question

In: Computer Science

Hi, i would like to know how to get information of an 'image' and put it...

Hi, i would like to know how to get information of an 'image' and put it on 'C programming'

I would also like to know how to compress the image information and decompress it.

Solutions

Expert Solution

we can get the information of an image on the output through c/c++ by following this steps:-

  1. we should install the code block IDE and it should be configured in graphics of c/c++.
  2. select a image which you want to insert , give a name and save it.
  3. now take a new file in the code block and save the file with .cpp extension.
  4. now start writing the code.
  5. include the graphics.h,conio.h header files.
  6. use initwindow();,readimagefile(); functions.
  7. In the initwindow() function we have three parameters they are we need to give the width,height of the window and title of the window.
  8. In the readimagefile() function we have to define the image path and its extension and also the size of the image form left,top,right,bottom.
  9. #include<graphics.h>
  10. #include<conio.h>
  11. int main()
  12. {
  13. initwindow(width of window,height of window"title of window");
  14. readimagefile(image path with name and extension"left,top,right,bottom);
  15. getche();
  16. }

2.how to compress and decompress the data using c language:-

  1. #include<io.h>
  2. #include<dir.h>
  3. #include<dos.h>
  4. #include<math.h>
  5. #include<alloc.h>
  6. #include<conio.h>
  7. #include<stdio.h>
  8. #include<process.h>
  9. #include<fcntl.h>
  10. #include<string.h>
  11. #include<graphics.h>
  12. #include<vprowait.h>
  13. #include<vpromenu.h>
  14. #include<vprocrc.h>
  15. #include<vprotree.h>
  16. #include<vprointr.h>
  17. Include all these header files and  run the program.Then u will get the output screen with fields including compression,decompression,help,about,date/time.
  18. now enter the source which you want to compress,see the properties of the image information and then select the destination type and finally enter the destination and now click on compress the data gets compressed.
  19. Now go to the properties and check the size of the data the size of the data gets decreased.
  20. In the same way there is the decompression in that enter the source which you want to decompress and see the properties if the image or data and then select the destination type and finally enter the destination and now click on decompress and the data gets decompressed.
  21. now go to the properties and check the size if the data the size of the data gets increased.
  22. now save the file and then type the following commands to know actually what has happened.
  23. dir datacomp*
  24. dir datacomp.c
  25. dir after.cmp
  26. dir original
  27. type AFTER.CMP
  28. type original
  29. type datacomp.c
  30. cls
  31. exit
  32. With all these commands we can come to know what are the changes that had happened during the compression and decompression of the data.

Related Solutions

I want to know how to get the "temp" information from a API response like this...
I want to know how to get the "temp" information from a API response like this in javascript: { "coord": { "lon": -122.08, "lat": 37.39 }, "weather": [ { "id": 800, "main": "Clear", "description": "clear sky", "icon": "01d" } ], "base": "stations", "main": { "temp": 282.55, "feels_like": 281.86, "temp_min": 280.37, "temp_max": 284.26, "pressure": 1023, "humidity": 100 }, "visibility": 16093, "wind": { "speed": 1.5, "deg": 350 }, "clouds": { "all": 1 }, "dt": 1560350645, "sys": { "type": 1, "id": 5122, "message":...
Hi, I would like to know how to do this question. Thanks Suppose that basketball (Raptors)...
Hi, I would like to know how to do this question. Thanks Suppose that basketball (Raptors) tickets are $60 each and hockey (Maple Leafs) tickets are $24 each. If you had basketball and hockey tickets such that you would initially trade 2 basketball tickets for each hockey ticket, which tickets would you trade and what would be your equilibrium exchange of basketball for hockey tickets? A) Trade hockey for basketball tickets until you reach 0.4 hockey per basketball tickets B)...
Hi, I would like to know about types of enteral feeding: symptons of intolerance and related...
Hi, I would like to know about types of enteral feeding: symptons of intolerance and related nursing interventions, nursing responsibilities related to NG tube feeding, and what assessment data would indicate desired outcome related to enteral nutrition? Thank you so much.
Hi, I would like to know what codification reference can be used for this case study:...
Hi, I would like to know what codification reference can be used for this case study: Top Notch Tires is a wholesaling and retailing company that deals in automotive tires for foreign cars. During the year-end audit, heated discussion occurs between management and the independent auditors. Management’s accounting policy for valuing inventory of imported tires reads as follows: Inventory is valued at actual cost plus any freight-in. At year-end, the warehousing costs related to the tires are prorated to cost...
Hi, I would like to know the answer in the following book. Investments. 11 Edition, from...
Hi, I would like to know the answer in the following book. Investments. 11 Edition, from chapter 1 - Problem Sets: 6 question: Q6) Suppose housing prices across the world double. a. Is society any richer for the change? b. Are homeowners wealthier? C. Can you reconcile your answers to (a) and (b)? Is anyone worse off as a result of the change? I don't have any details other than my textbook. Please let me know what else do you...
Hi, I would like to know which method should we use when doing physics calculations? Acceleration...
Hi, I would like to know which method should we use when doing physics calculations? Acceleration = Speed / Time Let's say we are given 5 measurements of speed and time. S1, S2, S3, S4, S5 and T1,T2,T3,T4,T5. We are given two methods. 1) Find the mean of speed and time, and find their respective standard deviation and standard error. E.g. speed = 0.5 +- 0.2 m/s and 3 +- 0.2 s, substituting into the acceleration formula and doing the...
I would like to know what is controlled substance and how should it be wasted? and...
I would like to know what is controlled substance and how should it be wasted? and what is the plan of care for a patient with neuropathic pain? Thank you.
Q. In java, I would like to know, especially how the program detect there is an...
Q. In java, I would like to know, especially how the program detect there is an error which is user should put only numerical data but if user put letter data (five, sixty instead of 5,60), *I want the program display "Invalid data. Please try again" instead of long error message(from the IDE)* when user put letter data(five, sixty stuff...) and GO BACK TO THE BEGINNING SO USER CAN PUT THE DATA AGAIN! Write a program that counts change. The...
I know the what the answers are but I don't know how to get them. Can...
I know the what the answers are but I don't know how to get them. Can you please explain the process? Thank you. Part VII. Discontinued Operations and Earnings per Share (11 points) Todd Corporation had pre-tax income for 2017 of $2,500,000. On December 31, 2017, Boyd disposed of a component of its business that represented a strategic shift in operation. That component had a Loss on Discontinued Operations of $450,000 (pre-tax). Boyd received $1,000,000 net cash proceeds from the...
Hi, I would like the numerical solution for this task so I can be able to...
Hi, I would like the numerical solution for this task so I can be able to model it in a kinetic modeling programme like Berkely Madonna (BM). This was the reason why I started my membership with Chegg Study but unfortunately, the solution to this problem was not available. I'm looking forward to hearing from you. you will find the task in de link below. With kind regards, Ahmed https://www.chegg.com/homework-help/comprehensive-problem-multiple-reactions-heat-effects-styren-chapter-12-problem-24qp-solution-9780132317160-exc in J.Snyder en B.Subramaniam, Chem. Eng. Sci., 49, 5585 (1994)....
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT