Jump to content

Steganography (Hidden Images-secret agenty stuff) v3.0 Updated July 12, 2014


Recommended Posts

Ugly, ugly code--I know. But, once something works, I rarely go back and clean it up. Sorry.

For encoding the image:

if (token.FullColor)
{
   point.R = (byte)((((int)point.R + 18) / (int)36));
   point.G = (byte)((((int)point.G + 18) / (int)36));
   point.B = (byte)((((int)point.B + 18) / (int)36));
   point.R = (byte)(((int)(CurrentPixel.R) & 248) + point.R); // 11111000
   point.G = (byte)(((int)(CurrentPixel.G) & 248) + point.G);
   point.B = (byte)(((int)(CurrentPixel. & 248) + point.;
}
else
{
   ColorBgra srcGrey = this.desaturateOp.Apply(point);
   iColor = srcGrey.R / 32;
   if (( iColor & 4) > 0 )
   {
       point.B = (byte)(((int)(CurrentPixel. & 254) + 1);
   }
   else
   {
       point.B = (byte)(((int)(CurrentPixel. & 254) + 0);
   }
   if ((iColor & 2) > 0)
   {
       point.G = (byte)(((int)(CurrentPixel.G) & 254) + 1);
   }
   else
   {
       point.G = (byte)(((int)(CurrentPixel.G) & 254) + 0);
   }
   if ((iColor & 1) > 0)
   {
       point.R = (byte)(((int)(CurrentPixel.R) & 254) + 1);
   }
   else
   {
       point.R = (byte)(((int)(CurrentPixel.R) & 254) + 0);
   }
}

For decoding 1 bit images:

for (int x = roi.Left; x {
   ColorBgra CurrentPixel = *srcPtr;
   GreyLevel = ((((int)CurrentPixel. & (int)1) * 4);
   GreyLevel += (((int)CurrentPixel.G) & (int)1) * 2;
   GreyLevel += (((int)CurrentPixel.R) & (int)1);
   CurrentPixel.R = (byte)(GreyLevel * 32);
   CurrentPixel.G = (byte)(GreyLevel * 32);
   CurrentPixel.B = (byte)(GreyLevel * 32);
   CurrentPixel.A = 255;
   *dstPtr = CurrentPixel;

   ++srcPtr;
   ++dstPtr;
}

For decoding color images:

for (int x = roi.Left; x {
   ColorBgra CurrentPixel = *srcPtr;
   CurrentPixel.R = (byte)((((int)CurrentPixel.R) & (int)7) * 36);
   CurrentPixel.G = (byte)((((int)CurrentPixel.G) & (int)7) * 36);
   CurrentPixel.B = (byte)((((int)CurrentPixel. & (int)7) * 36);
   CurrentPixel.A = 255;
   *dstPtr = CurrentPixel;

   ++srcPtr;
   ++dstPtr;
}

Click to play:
j.pngs.pngd.pnga.pngp.png
Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game

Link to comment
Share on other sites

  • 1 month later...

Thank you for the effect - It's kind of a fun plug-in, isn't it? I still haven't made a decent banner hiding an uncorrupted image . . . too many transparent pixels and too many blocks of solid color in my attempts so far. I'll keep working at it.

1223994961_newstonesoup.png

... I should have been a pair of ragged claws ... - T.S. Eliot

Taboo Monkey Blue Blog: Writing on Writing - Sudoku Tips and Tricks - The Greatest Maze

Link to comment
Share on other sites

Ugly, ugly code--I know. But, once something works, I rarely go back and clean it up. Sorry.

For encoding the image:

if (token.FullColor)
{
   point.R = (byte)((((int)point.R + 18) / (int)36));
   point.G = (byte)((((int)point.G + 18) / (int)36));
   point.B = (byte)((((int)point.B + 18) / (int)36));
   point.R = (byte)(((int)(CurrentPixel.R) & 248) + point.R); // 11111000
   point.G = (byte)(((int)(CurrentPixel.G) & 248) + point.G);
   point.B = (byte)(((int)(CurrentPixel. & 248) + point.;
}
else
{
   ColorBgra srcGrey = this.desaturateOp.Apply(point);
   iColor = srcGrey.R / 32;
   if (( iColor & 4) > 0 )
   {
       point.B = (byte)(((int)(CurrentPixel. & 254) + 1);
   }
   else
   {
       point.B = (byte)(((int)(CurrentPixel. & 254) + 0);
   }
   if ((iColor & 2) > 0)
   {
       point.G = (byte)(((int)(CurrentPixel.G) & 254) + 1);
   }
   else
   {
       point.G = (byte)(((int)(CurrentPixel.G) & 254) + 0);
   }
   if ((iColor & 1) > 0)
   {
       point.R = (byte)(((int)(CurrentPixel.R) & 254) + 1);
   }
   else
   {
       point.R = (byte)(((int)(CurrentPixel.R) & 254) + 0);
   }
}

Is this "codelab code"? I get errors at line 13 (wrong token) when I use it with codelab...

How about moving all steganography effects to the new "advanced" submenu?

Link to comment
Share on other sites

I don't believe there is a need to move the entire set into the Advanced category for two reasons.

Firstly, the Steganography plugin is unique by the fact it uses different 'effects' to do the different tasks, therefore having them all in one folder would both be logical and contain them in one location - its own submenu.

And secondly, Steganography, or at least how BoltBait has created it, isn't 'advanced' in any way, not like ScriptLab and Code Lab is. Think of it this way, which would be more complicated to the average user, Code Lab or Steganography?

If you're wondering why I keep associating Code Lab with the Advanced sub menu:

I think CodeLab should go in the "Advanced" sub-Menu :)

I agree.

Next release of CodeLab will move it into the Advanced submenu.

Link to comment
Share on other sites

Of course I know what's discussed about "advanced". That was only a new attempt to get rid of one submenu. I don't know why I'm so into this as time will bring me victory. When I reached the point that I only have 4/5 submenus but all plugins via 3.20, I have to block my access to my money as there is the massive danger that I would donate all of it because of my deep feeling of satisfaction... :D

However, the reason for my post was mainly the code issue.

Link to comment
Share on other sites

  • 2 weeks later...

Ooh, the xxxx xxxxxxxx xx xxx xxxxxxxxxx! Very nice. :-)

 

The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.
Amy: But how did it end up in there?
The Doctor: You know fairy tales. A good wizard tricked it.
River Song: I hate good wizards in fairy tales; they always turn out to be him.

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 3 weeks later...

I used the plug-in to hide a color photo in the picture that I attached to my last post. When I "reveal" the hidden picture, it does not come out the same way it went in. The colors are blurred and the detail is lost. It's still identifiable, but the quality is way down. Can I only hide one photo in another, or does the type of pictures matter at all? Thanks.

MrRezister2a.gif
Link to comment
Share on other sites

I used the plug-in to hide a color photo in the picture that I attached to my last post. When I "reveal" the hidden picture, it does not come out the same way it went in. The colors are blurred and the detail is lost. It's still identifiable, but the quality is way down. Can I only hide one photo in another, or does the type of pictures matter at all? Thanks.

The reason for this is that the picture you are hiding is being reduced from 24 bits to 3 bits. You have to expect a great deal of quality loss during that process.

You can see what your picture will look like by using the Preview check box.

Also, you can dither your picture before encoding it since dithering will yeild a higher quality than what I'm doing.

So, basically, it is working as designed.

Click to play:
j.pngs.pngd.pnga.pngp.png
Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game

Link to comment
Share on other sites

No. It's stored in the code of the image, not the pixels itself.

It would have to be an absolutely perfect printout, and an absolutely perfect scan. Neither of those exist.

But good idea! :-)

 

The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.
Amy: But how did it end up in there?
The Doctor: You know fairy tales. A good wizard tricked it.
River Song: I hate good wizards in fairy tales; they always turn out to be him.

Link to comment
Share on other sites

No. It's stored in the code of the image, not the pixels itself.

An image is made up solely of pixels. There is no "code of the image." The steno is being done by manipulating the pixels.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

No. It's stored in the code of the image, not the pixels itself.

An image is made up solely of pixels. There is no "code of the image." The steno is being done by manipulating the pixels.

Oh, wow...I can't believe I typed that. Just woke up from a nap...wow. Okay, yes.

The stenography is achieved by hiding the secondary image in the least significant parts of the pixels that form the primary image, at the code level. It's not supposed to be visible in the pixels themselves until revealed. Since it's designed to be invisible to the naked eye, then, a printer (which always damages an image as it prints it) would completely destroy the secondary image.

As I'm thinking about it more, the scanner wouldn't be able to scan it as individual pixels, anyway, and it would have to be very lucky to render the scan as the exact pixels that were printed.

Sorry for the confusion.

Rick, I swear I'm not an idiot...

 

The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.
Amy: But how did it end up in there?
The Doctor: You know fairy tales. A good wizard tricked it.
River Song: I hate good wizards in fairy tales; they always turn out to be him.

Link to comment
Share on other sites

Yeah, I tried several distortions to the steg'd image. Even if you slightly change the brightness (Which WILL happen if you scan) the hidden image is destroyed.

It WAS a nice thought though. :P

UPDATE:

OoOoOoOoO.

I just tried this: I took an image and set the transparency ADJUSTMENT to about the first setting so it wasn't visible but technically barely opaque.

Then I put this image on top of a white canvas.

Then I ran the reveal tool and it came up. (kinda light, just use the levels tool to fix that)

This method let's the image survive twist, oblique, ANY rotation and more.

Sadly, noise still kills it. It's a start though.

Sorry if I seem kind of obsessed. I'm truly fascinated with this steganography concept :)

Thanks for listening :P

ryansigmoon.png
Link to comment
Share on other sites

  • 4 weeks later...

So don't encode any state secrets, and you should be fine. :-)

You just need to realize, this isn't for any professional thing. It's just for fun.

 

The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.
Amy: But how did it end up in there?
The Doctor: You know fairy tales. A good wizard tricked it.
River Song: I hate good wizards in fairy tales; they always turn out to be him.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...