0

I am working on a project where I need to play with two bitmaps. I am putting them in a grid one over the other with reduced opacity (to give a watermark effect).

I am rendering the grid to a bitmap using RenderTargetBitmap and saving the bitmap to a file.
Now my requirement is to load the rendered bitmap again and recover the original pictures separately. Is there any way to recover the original images again. I am not able to think any algorithm to implement this.

My aim is to give a watermarking effect and then recover the images individually.

4
  • maybe you should paste some code.. Apr 15, 2011 at 6:04
  • so you to watermark an image and then dewatermark it? Apr 15, 2011 at 6:23
  • @ CuiPengFei:-yes, a sort of watermark and dewatermark
    – user604243
    Apr 15, 2011 at 6:43
  • @soner:-problem is not for the code but is for the concept. Just suggest me some algorithm to accomplish watermarking and then dewatermarking.
    – user604243
    Apr 15, 2011 at 7:00

4 Answers 4

1

No. The information is lost during "flattening" of the image.

You need to save both images and information about their properties (position, opacity) into single file. And restore it on load.

1
  • yes, that's why i asked you guys to suggest me other ways of accomplishing watermarking and then dewatermarking.
    – user604243
    Apr 15, 2011 at 6:54
0

If your goal is to simulate watermarking and allow later 'dewatermarking', then assuming that you have your watermarking bitmap present at decoding time, you probably can do that. Sure you cannot use your initial approach - just simple merging of two layers is not reversible.

You need to use some reversible transformation, like rotating source image pixel RGB values vector, using watermark image pixel RGB values as parameters. While dewatermarking you just use negative values from watermark image.

Well, RGB vector is not ideal - you can go out of RGB space while rotating it. Probably you can find color space (or some other transformation in RGB space), better suited to your goal.

(English is not my first or even second language, thereby I apologize if you can't understand my idea - just ask over.)

3
  • - Your English is good enough. But i still wonder whether i can achieve clean watermark effect by doing stuffs with RGB values like rotating and all.
    – user604243
    Apr 15, 2011 at 12:45
  • You can't achieve clean effect - idea of watermarking is just to alter image in a non-reversible way. Why can't you save original bitmaps somewhere btw? You original posting implicitly states that you have original available.
    – Arvo
    Apr 15, 2011 at 12:50
  • The complete idea suppose i have an image which i don't want other people to see. I want to perform this using multiple watermarking, i,e making the original image unrecognizable using multiple layers of watermarks and finally retrieve the original image with a password.
    – user604243
    Apr 15, 2011 at 13:06
0

Why don't you try to make it two layers of bitmap?

3
  • I just think you can keep your none-watermarked image on your disk. When the image needs to be exposed, watermark it dynamically.
    – Howard
    Apr 15, 2011 at 6:25
  • - actually scenario is reverse of what you are saying. I have a watermarked image and i have to show the original image dynamically.
    – user604243
    Apr 15, 2011 at 6:57
  • Just an interesting idea. :) we can get the watermarked region. Clip the same area from the source image, and paste to the watermarked bitmap. Since you have the both source bitmap and watermarked one, it's not an easy algorithm to get rid of the watermark and high cost. Watermark is easy to add but not easy to get rid of. Just my thought.
    – Howard
    Apr 15, 2011 at 7:41
0

i wonder if you can use TIFF format, where you can store multiple images. that way on display you can choose to show with/without watermark.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.