Results 1 to 6 of 6

Thread: Hiding Data in Image

  1. #1
    Join Date
    Feb 2014
    Location
    Romania
    Posts
    25
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: Hiding Data in Image

    Hello all,

    I would like to know if there is an easy way to implement the Steganography concept using QT.

    I should say that "Steganography means hiding one piece of data within another".
    For this, I want to use LSB(Least Significant bit) insertion.

    I've searched on the web and found some info about this and I want to share:
    1) The least significant bit (in other words, the 8th bit) of some or all of the bytes inside an image is changed to a bit of the secret message
    2) When using a 24-bit image, a bit of each of the red, green and blue colour components can be used, since they are each represented by a byte.

    Also, read that only on .BMP images can be applied as they use lossless compression.
    I'm not very familiar with image format ant which is the difference between. Am I only achieve this on .bmp images, or I will succeed with any format, e.g. jpeg.

    However, I cannot find a way of implementing/changing the last bit from a byte, using QT.

    Can someone help me?

    Let's take an example
    A grid for 3 pixels of a 24-bit image can be as follows:
    (00101101 00011100 11011100)
    (10100110 11000100 00001100)
    (11010010 10101101 01100011)
    When the number 200, which binary representation is 11001000, is embedded into the least significant bits of this part of the image, the resulting grid is as follows:
    (00101101 00011101 11011100)
    (10100110 11000101 00001100)
    (11010010 10101100 01100011)

    Hope I'm very clear on what I want to do and I would highly appreciate your help.

    If you have any questions about this, please do not hesitate to ask me.

    Thanks


    Added after 28 minutes:


    Ok I found this Qt QImage pixel manipulation problems.

    However, it is not working as expected:|.

    Can someone help me, please? add the necessary comments, etc
    Last edited by nimrod1989; 7th September 2014 at 19:09.

  2. #2
    Join Date
    Feb 2014
    Location
    Romania
    Posts
    25
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: Hiding Data in Image

    I'm afraid I cannot find a way to change according my scenario the LSB. Does anyone have an example of how this can be done programmatically?

  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Hiding Data in Image

    What did you try?

    Changing the last bit of each byte in QImage::bits() seems pretty straight forward.

    Quote Originally Posted by nimrod1989 View Post
    Also, read that only on .BMP images can be applied as they use lossless compression.
    I'm not very familiar with image format ant which is the difference between. Am I only achieve this on .bmp images, or I will succeed with any format, e.g. jpeg.
    There are other loss-less compression using formats, e.g. PNG.

    Cheers,
    _

  4. #4
    Join Date
    Feb 2014
    Location
    Romania
    Posts
    25
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: Hiding Data in Image

    Hi Anda,

    Thank you for the tip. I will see what I can do. However, I've read the documentation and it is not so straight forward as you say. (at least for me)

  5. #5
    Join Date
    Jul 2015
    Posts
    1
    Platforms
    Windows

    Default Re: Hiding Data in Image

    Hi i am working on the same project can you tell me sir the way that you find the RGB code of each pixel?

  6. #6
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Hiding Data in Image


Similar Threads

  1. Hiding a tab in QTabBar widget
    By erik in forum Qt Programming
    Replies: 9
    Last Post: 12th February 2017, 12:29
  2. Hiding QGraphicsRectItems
    By ddze in forum Qt Programming
    Replies: 4
    Last Post: 29th January 2011, 10:01
  3. Hiding code from the user
    By Plixil in forum Newbie
    Replies: 4
    Last Post: 19th July 2010, 11:36
  4. qgridlayout and hiding widgets
    By Michael_Levin in forum Newbie
    Replies: 3
    Last Post: 21st May 2010, 17:47
  5. Hiding files which don´t fit the filter
    By Percy in forum Newbie
    Replies: 2
    Last Post: 27th April 2010, 15:51

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.