Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Storing text information in an image

Storing text information in an image

Scheduled Pinned Locked Moved C#
questioncsharpdesignhelp
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Maqsood Ahmed
    wrote on last edited by
    #1

    Hello, Does anyone have any idea that how can I store extra information in an image. such as text, as a part of image. I don't want to show the text in an image but I want to store this information in it. Actual I have to design an application which can embed and retrieve text messages from an image. Something like message smuggler (software) does. Any help in this regard? TIA Maqsood Ahmed - MCAD.net Kolachi Advanced Technologies http://www.kolachi.net

    V L 2 Replies Last reply
    0
    • M Maqsood Ahmed

      Hello, Does anyone have any idea that how can I store extra information in an image. such as text, as a part of image. I don't want to show the text in an image but I want to store this information in it. Actual I have to design an application which can embed and retrieve text messages from an image. Something like message smuggler (software) does. Any help in this regard? TIA Maqsood Ahmed - MCAD.net Kolachi Advanced Technologies http://www.kolachi.net

      V Offline
      V Offline
      Vikram A Punathambekar
      wrote on last edited by
      #2

      Google for steganography. Cheers, Vikram.


      "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.

      1 Reply Last reply
      0
      • M Maqsood Ahmed

        Hello, Does anyone have any idea that how can I store extra information in an image. such as text, as a part of image. I don't want to show the text in an image but I want to store this information in it. Actual I have to design an application which can embed and retrieve text messages from an image. Something like message smuggler (software) does. Any help in this regard? TIA Maqsood Ahmed - MCAD.net Kolachi Advanced Technologies http://www.kolachi.net

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        HI! You can add information in the lowest significant bits of the color at each pixel. A human eye will not be able to see those minor differences. A simple example: You have two pixel and want to use the 2 lowest significant bits at each pixel of each color. (3-colors * 2-bit) * 2-pixel = 12-bits In an two pixel image with three colors and a use of 2 bits of each color, you can store 12-bits, so 1.5-byte in it. But usually you have bigger size picture ;-), so you can store more data inside. For Example: 1024 x 768 pciture (3-colors * 2-bit) * (1024 * 768)-pixel = (6 * 786432)-bits = 4718592-bits = 589824-byte = 576kb So, in a normal wallpaper, you can store for example 576kb of data (that could be text or binary data). But take care of compression with data loose, like jpeg. And remember, 3 colors is just an example, because it will just work if you use 24-bit color-depth images, but it is possible for other color depths too. Marcel Erz

        M 1 Reply Last reply
        0
        • L Lost User

          HI! You can add information in the lowest significant bits of the color at each pixel. A human eye will not be able to see those minor differences. A simple example: You have two pixel and want to use the 2 lowest significant bits at each pixel of each color. (3-colors * 2-bit) * 2-pixel = 12-bits In an two pixel image with three colors and a use of 2 bits of each color, you can store 12-bits, so 1.5-byte in it. But usually you have bigger size picture ;-), so you can store more data inside. For Example: 1024 x 768 pciture (3-colors * 2-bit) * (1024 * 768)-pixel = (6 * 786432)-bits = 4718592-bits = 589824-byte = 576kb So, in a normal wallpaper, you can store for example 576kb of data (that could be text or binary data). But take care of compression with data loose, like jpeg. And remember, 3 colors is just an example, because it will just work if you use 24-bit color-depth images, but it is possible for other color depths too. Marcel Erz

          M Offline
          M Offline
          Maqsood Ahmed
          wrote on last edited by
          #4

          Thanks for the reply :) Maqsood Ahmed - MCAD.net Kolachi Advanced Technologies http://www.kolachi.net

          L 1 Reply Last reply
          0
          • M Maqsood Ahmed

            Thanks for the reply :) Maqsood Ahmed - MCAD.net Kolachi Advanced Technologies http://www.kolachi.net

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            Hi! An other possible way would be, to store it in comment fields of file formats. Not every file format has got this comment field, but i.e. gif has it! So, if you need more information about it, I saw an article on this page which describe how to save an exe file to the comment field of an gif: http://www.codeproject.com/useritems/Steganography.asp[^] Marcel Erz

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups