-3

I want to upload images to my website, before uploading.. I want to add a watermark at the bottom of the image that will have full width on background but website logo size will NOT change.

example image (look at bottom): http://d24w6bsrhbeh9d.cloudfront.net/photo/5265056_460s_v1.jpg or http://www.damnlol.com/i/fb77b9fd16be21d394003164d6087bdd.jpg

I want to do it using ASP.NET and C#..

user189930
  • 37
  • 1
  • 4
  • Show us what have you tried. Nobody will do the work for you. – chaliasos Sep 04 '12 at 11:46
  • I didn`t try anything because I didn`t find any solution, all what I found is watermark on image itself.. – user189930 Sep 04 '12 at 11:48
  • @user189930 - If you are not willing to even try to do this yourself we cannot help you. Determine the width and height of the image. If you know this you know where the bottom of the image is and you can generate a watermark automatically. The better solution would be to generate a single watermark image ahead of time and modify that stream based on the target image. – Security Hound Sep 04 '12 at 11:52
  • This sounds like a job for Image Magick http://www.imagemagick.org/script/index.php – Luke Baughan Sep 04 '12 at 11:55
  • the width is not known as will as the height.. it can be any image in the world.. please help me this is the first time I use watermark on asp.net – user189930 Sep 04 '12 at 12:00
  • GIYF -> http://stackoverflow.com/questions/465172/merging-two-images-in-c-net – SeanCocteau Sep 04 '12 at 12:50

1 Answers1

0

Why not do this dynamically to any images that your site serves?

Look at Image Handler section, MS actually gives some working code on adding an imagehandler that adds watermark dynamically to an image served to a users browser (so you don't have to add the watermark to your physical images.

As for the image dimensions, you could simply do some code that will check the image dimensions, and possibly add different watermarks etc, or add a generic watermark like 9gag have done and crop the image, so it will always 'fit'.

Paul Zahra
  • 9,522
  • 8
  • 54
  • 76