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

  Create a simple warm-up program using your g3d

Create a simple warm-up program using your G3D programming and graphics environment.

  Shadow effect while rolling a sphere

Shadow effect while rolling a sphere as well as the options of shading and lighting.

  Relative positioning and interactive positioning

Relative Positioning and Interactive Positioning by Dragging and Clicking and some Simple Animation

  Draw a teapot at the global origin

Draw a teapot at the global origin

  Concepts of computer graphics

Concepts of Computer Graphics and develop a program using OpenGL

  The security policy document outline

Using the GDI Case Study below, complete the Security Policy Document Outline

  Develop the image manipulations

Develop the image manipulations

  What does resolution mean

What does resolution mean How is resolution connected to ppi and dpi units

  Differentiate between a bitmap image and a vector image

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

  Essential elements of a design pattern

configuration of an Iterator pattern, patterns could be used in a Library System, Singleton, Template, Decorator, Façade,What does Alexander means by the following declaration "But it is impossible to form anything which has the temperament of natu..

  Framework of user interface design

design of user interfaces, natural mapping, GUI applications, web page design different to designing for printed media, risks exposed in this "phone as individual proxy" approach, interaction designers of ubicomp applications, Storyboards are usual..

  What are the factors affecting picture composition

Define picture composition What are the factors affecting picture composition. Elaborate on each factor Describe the basic lines present in a composition

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