Create new pgm file to hold changed image

Assignment Help Computer Graphics
Reference no: EM131065000

1. Read three command-line arguments, the first is the image we wish to hide a file in, the second is the filename of the file we wish to hide, the third is the filename that we will write the hidden image to.

2. copy the original image to an array

3. create new pgm file to hold changed image

4. allocate memory for the new image data

5. start at the mask image's 0,0 pixel

6. for each bit in the hidden file

a. drop the least significant bit from the mask image current pixel value

b. add a 1 to that pixel value if the corresponding hidden file bit is a 1

c. add a 0 (or don't) to that pixel value if the corresponding hidden file bit should be a 0

d. move to the next pixel in the image (the next column in the image, or the next row's 0th column if at the max column has been reached)

7. write an EOF character in the next 8 image pixels

8. save the array to a file using the pgm image format we've been using for the prior projects

Your goal (for the decode portion): to write a program that will:

1. read two command-line arguments; take the first command-line argument which is the filename of an image (we will provide two pgm images to test with)

2. read that image from the provided filename to an array

3. open the decoded file with the second command-line argument as the filename

4. for each pixel in the image

a. if the last bit is zero

i. make the next corresponding bit in the hidden file a 0

b. if the last bit is one

i. make the next corresponding bit in the hidden file a 1

5. write each decoded byte to the decoded file

Reference no: EM131065000

Questions Cloud

Calculate its moment of inertia i2 with respect to axis 2-2 : The moment of inertia with respect to axis 1-1 of the scalene triangle shown in the figure is 90 ×103 mm4. Calculate its moment of inertia I2 with respect to axis 2-2.
Discuss how healthcare organizations are financed : Discuss how healthcare organizations are financed. There are two means of acquiring capital for healthcare business: debt capital or equity. Describe the features of both. Finally indicate how businesses determine and interpret the corporate cost of ..
Determine the polar moment of inertia ip of an isosceles : Determine the polar moment of inertia IP of an isosceles triangle of base b and altitude h with respect to its apex (see Case 5, Appendix D).
Limiting resource managers often seek to produce : Question 2  When constrained by a limiting resource, managers often seek to produce those products which have:
Create new pgm file to hold changed image : Read three command-line arguments, the first is the image we wish to hide a file in, the second is the filename of the file we wish to hide, the third is the filename that we will write the hidden image to. copy the original image to an array and c..
Determine the moment of inertia ic with respect to an axis : One quarter of a square of side a is removed (see figure). What are the coordinates and of the centroid C of the remaining area?
What purpose of sequence diagrams and communication diagrams : What size do you think a project needs to be in order to require project management? Discuss this question for project management in general and for each of the project-planning activities. Consider the various "size" factors of a project, such as..
Doug custom construction company : Exercise 26-2 Doug's Custom Construction Company is considering three new prodects, each reguiring an equipument investment of $25.080. each project will last for 3 year and produce the following net annual cash flows.
Calculate the expected and the actual capital gains yield : Calculate the Expected and the Actual Capital Gains Yield (CGY), the Current (Coupon) Yield (CY), and the Total Yield (TY) for each security during 2013 and 2014. Also find the present Yield-to-Maturity for each security.

Reviews

Write a Review

Computer Graphics Questions & Answers

  Gui-based program checking for a palindrome

For this Programming Activity, you will write a GUI-based program checking for a Palindrome.

  Create a quality product for a selected audience

Apply knowledge of poster design or website design to create a quality product for a selected audience - find the information resources you need for this project

  Selecting bit mapped or vector graphics

For each of the provide a detailed rational for selecting bit mapped or vector graphics when they used in a web based application,

  Question about troubleshooting problem

Consider the most difficult troubleshooting problem you have encountered in your recent experience- one where the solutions was not straightforward

  Bullhow ismight the strategic plan be communicated to

bullhow ismight the strategic plan be communicated to various levels o management a variety of differing teams and to

  What do you understand by quatree and octree

What do you understand by QUATREE and OCTREE?

  How the product positioning is aligned with mcdonalds

how the product positioning is aligned with mcdonalds corporate strategy. identify potential gaps in the product line

  How to secure a domain name and find a host for a website

Research how to secure a domain name and find a host for a website. Discuss website design basics; characteristics of well-designed websites; the structure of a website; and the Web accessibility issues.

  Your task is to carry out a critical analysis and

your task is to carry out a critical analysis and evaluation of strategy development in a well established

  Differentiate between a bitmap image and a vector image

Differentiate between a bitmap image and a vector image Explain the following terms

  Word fields for different mapping techniques

Consider a cache consisting of 256 blocks of 16 words each, for a total of 4096(4k) words and assume that the main memory is addressable by a 16 bit address and it contains of 4k blocks. How many bits are there in each of the TAG, BLOCK/SET and WORD ..

  Describe the usefulness of animation and graphics

Describe the usefulness of animation and graphics

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd