Write a function to decode the original text

Assignment Help Computer Engineering
Reference no: EM131845656

Problem

1. Is it possible to hide a color picture in another color picture? Why or why not?

2. If you erase lower two bits in the red value, you can clear space for hiding values 0-4.

for p in getpixels(picture):
# Clear out the red 2xLSB
r = getRed(p)
setRed(p, r -(r%4))

If you erase the lower two bits from red, green, and blue, you can save six bits. Six bits can encode 64 values. That's enough to encode all 27 letters, both upper and lowercase.

(a) Write a function to input a picture and a string. Save each character in the string in a pixel of the picture, by saving it across the least significant two bits in each of red, green, and blue. Can you tell the difference between the original picture and the picture with the encoded text message?

(b) Now write a function to decode the original text.

Reference no: EM131845656

Questions Cloud

Self immolation of a vegetable seller in tunisia : The self immolation of a vegetable seller in Tunisia on December 18, 2010 triggered a series of uprisings in many Middle Eastern countries
What are the implications of increased shoplifting : According to a recent survey by the US National Retail Federation, shoplifting is the biggest and most rapidly growing cause of inventory shrinkage.
National legislatures in foreign policy decision-making : Discuss the role of interest groups, public opinion, and national legislatures in foreign policy decision-making. In what ways can these actors influence
Politics between and among states : Dingwerth and Pattberg state that "whereas international relations is largely interested in politics between and among states
Write a function to decode the original text : If you erase lower two bits in the red value, you can clear space for hiding values 0-4. Write a function to decode the original text.
Operation provide comfort : Which international relations theory/perspective best explains Operation Provide Comfort? Why?
What characteristics does effective mission statement have : Identify an industry that is undergoing intense competition or is being featured in the business press. Discuss how scenario planning might be used by companies
Efforts at international cooperation in regulating : Although there is near- universal condemnation of war crimes as a general rule, efforts at international cooperation in regulating
What is the role and importance of the icc in world politics : What is the role and importance of the ICC in world politics? Why do we need an organization like the ICC in world politics?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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