Click here to Skip to main content
15,902,299 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi, I have the code to Steganography text in image (C#,VB.NET)

Dim PicBytes As Long = PicFileStream.Length
        Dim PicExt As String = PicBuffer.Extension
        Dim PicByteArray(PicBytes) As Byte
        PicFileStream.Read(PicByteArray, 0, PicBytes)
        Dim SentinelString() As Byte = {73, 116, 83, 116, 97, 114, 116, 115, 72, 101, 114, 101}

        Dim PlainText As String = txtchin
        Dim PlainTextByteArray(PlainText.Length) As Byte
        For i As Integer = 0 To (PlainText.Length - 1)
            PlainTextByteArray(i) = CByte(Asc(PlainText.Chars(i)))
            Application.DoEvents()
        Next



1-I want save 诶擪艾設䍵马 without base64
2-How can Steganography text size 8MB or more in image Without any losses or problems

Thank you

What I have tried:

txtchin is string (like 诶擪艾設䍵马) when Steganography text become ??????????
Posted
Updated 2-Aug-18 6:01am
v2

Have you read the Steganography: Simple Implementation in C#[^] article?


The limits to how much text can be stuffed into an image are going to be based on image size; you obviously cannot stuff 8MB of text into a 2MB picture. Best advice would be to encode or compress the text to limit necessitated minimum image size.

The text size seems huge; almost 900 typewritten pages of the 4 bytes/character needed for the text you gave
 
Share this answer
 
Quote:
How can Steganography text size 8MB or more in image Without any losses or problems

Steganography is technical stuff, there is no magic, it imply losses.
The principle of Steganography is to replace a part of a picture with some arbitrary data, all the trick is to choose what will be replaced. By carefully choosing a high quality picture and encoding of data, the loss will be invisible to human eyes.
Usual encoding imply the picture to be at least 8 times bigger than data to hide, in your case, the picture must be at least 64MB, and no compression.
Steganography do not need base64 encoding of text.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900