.jpg watermarking

Discussion in 'ASP .Net' started by Bob, Feb 16, 2006.

  1. Bob

    Bob Guest

    I have some JPG files on my website. I'd like to know if there is a way to
    dynamically watermark these images before I display them on the website.

    I'm running ASP.NET 2.0 C#.

    Thank you very much.
     
    Bob, Feb 16, 2006
    #1
    1. Advertising

  2. You could take some free code like http://www.codeproject.com/csharp/watermark.asp , and stream it to the client instead of making an actual jpg file. You would reference your image as <img src="watermark.aspx?id=9345" /> or somethign similar.

    watermark.aspx would be a blank aspx page where all the work would be done in the codebehind on the page_load handler. It would have a piece of code like this:

    // Change the response headers to output a JPEG image
    this.Response.Clear();
    this.Response.ContentType = "image/jpeg";
    // Stream data here

    That's a basic overview, but enough to get you started... Of course, it would be easier if you watermark your images before the fact that way you do not waste CPU time doing it over and over (plus you get to display the images at design time).
     
    =?iso-8859-1?Q?Gabriel_Maga=F1a?=, Feb 16, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Roland
    Replies:
    0
    Views:
    1,096
    Roland
    May 12, 2004
  2. Matthias
    Replies:
    5
    Views:
    463
    Whitecrest
    Jun 1, 2004
  3. Yannick

    ASP changes Big JPG -> Small JPG

    Yannick, Feb 2, 2004, in forum: ASP General
    Replies:
    6
    Views:
    171
    Tim Williams
    Feb 3, 2004
  4. Vilmar Brazão de Oliveira
    Replies:
    14
    Views:
    379
    Aaron Bertrand [MVP]
    Mar 5, 2004
  5. Replies:
    3
    Views:
    280
    Andy Dingley
    Sep 27, 2006
Loading...

Share This Page