Writing a text on an image with ASP ?

Discussion in 'ASP General' started by Fred, Nov 16, 2005.

  1. Fred

    Fred Guest

    Hello,

    I would like to dynamically add a text as a watermark on images.

    I managed to do that with aspsmartimage but as the watermark is added
    when the image is sent to the browser, it takes too much ressources on
    the server, due to a big number of images to diplay simultaneously.

    Is there a way or an other component to do that more efficiently. I
    can't add the watermark when uploading the file because it has to be
    written when the image is displayed.

    Thanks for your help.

    Fred
     
    Fred, Nov 16, 2005
    #1
    1. Advertising

  2. Fred

    Patrice Guest

    IMO :
    - double check that your code runs as fast as possible (in particular do you
    work on thumbnails or full scale images ?). Are you sure this is the
    watermak process that makes the speed difference ?
    - else I suppose the watermark change with each request ? See if changing
    this point wouldn't worth.

    --
    Patrice

    "Fred" <> a écrit dans le message de
    news:437b0e34$0$20141$...
    > Hello,
    >
    > I would like to dynamically add a text as a watermark on images.
    >
    > I managed to do that with aspsmartimage but as the watermark is added
    > when the image is sent to the browser, it takes too much ressources on
    > the server, due to a big number of images to diplay simultaneously.
    >
    > Is there a way or an other component to do that more efficiently. I
    > can't add the watermark when uploading the file because it has to be
    > written when the image is displayed.
    >
    > Thanks for your help.
    >
    > Fred
     
    Patrice, Nov 16, 2005
    #2
    1. Advertising

  3. Fred

    Guest

    You could always use the image as a background image on a table or td
    and write your text in the usual manner.

    Best regards,
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips
     
    , Nov 16, 2005
    #3
  4. Fred

    Patrice Guest

    Not sure what is the goal of a watermark but I assumed it is to "protect"
    the image by having some kind of label inside the image.
    If this is the case it would be really easy easy here to pick the clean
    image...

    --
    Patrice

    <> a écrit dans le message de
    news:...
    > You could always use the image as a background image on a table or td
    > and write your text in the usual manner.
    >
    > Best regards,
    > J. Paul Schmidt, Freelance Web and Database Developer
    > www.Bullschmidt.com
    > Access Database Sample, Web Database Sample, ASP Design Tips
    >
     
    Patrice, Nov 16, 2005
    #4
  5. Fred

    Fred Guest

    Patrice a écrit :
    > Not sure what is the goal of a watermark but I assumed it is to "protect"
    > the image by having some kind of label inside the image.
    > If this is the case it would be really easy easy here to pick the clean
    > image...
    >


    Exactly.

    The idea is to display these images on different website (12 for the
    moment), with a different watemark for each (the url of the site will
    appear on the bottom right of the image).

    And I need to keep the original image because on other websites, it will
    be displayed without watermark.

    I thought of duplicating the images but it will take too much diskspace.

    Fred
     
    Fred, Nov 16, 2005
    #5
  6. Fred

    Patrice Guest

    What is the size of those files ? How much files do you display on a page ?
    Is it much quicker if you do a test without watermarking those files ? The
    point is my earlier post was to make sure that you work on files that are as
    small as possible (sometimes one uses the real file for "thumbnails" instead
    of using a real thumbnail that would save download or processing time).

    I don't know how good is ASPIMage. You could likely compare this one with
    some other components by processing a batch of x files and see how it
    performs ?

    Instead of storing all files, you could perhaps have a "cache" like system.
    It would avoid duplicating all the files but you could have still perhaps
    some gain especially if some of those files tends to be more frequently used
    than others (a daily job could delete too old files).

    Good luck.

    --
    Patrice

    "Fred" <> a écrit dans le message de
    news:437b536a$0$19721$...
    > Patrice a écrit :
    > > Not sure what is the goal of a watermark but I assumed it is to

    "protect"
    > > the image by having some kind of label inside the image.
    > > If this is the case it would be really easy easy here to pick the clean
    > > image...
    > >

    >
    > Exactly.
    >
    > The idea is to display these images on different website (12 for the
    > moment), with a different watemark for each (the url of the site will
    > appear on the bottom right of the image).
    >
    > And I need to keep the original image because on other websites, it will
    > be displayed without watermark.
    >
    > I thought of duplicating the images but it will take too much diskspace.
    >
    > Fred
     
    Patrice, Nov 16, 2005
    #6
  7. Fred

    Fred Guest

    Patrice a écrit :
    > What is the size of those files ? How much files do you display on a page ?
    > of using a real thumbnail that would save download or processing time).


    In fact, I already have all those images displayed on the websites
    without any problems. They are jpg files of about 70ko and an average
    width of 500px.

    When I used ASPImage to add the watermark, the CPU was almost all the
    time at 100% whereas it is usually at around 30-40%.

    I'll try your idea to benchmark different components.

    Thanks,

    Fred
     
    Fred, Nov 17, 2005
    #7
  8. Fred

    Patrice Guest

    And how many files are you processing ? It looks like it should be really
    quick...

    --

    "Fred" <> a écrit dans le message de
    news:437cab4c$0$18345$...
    > Patrice a écrit :
    > > What is the size of those files ? How much files do you display on a

    page ?
    > > of using a real thumbnail that would save download or processing time).

    >
    > In fact, I already have all those images displayed on the websites
    > without any problems. They are jpg files of about 70ko and an average
    > width of 500px.
    >
    > When I used ASPImage to add the watermark, the CPU was almost all the
    > time at 100% whereas it is usually at around 30-40%.
    >
    > I'll try your idea to benchmark different components.
    >
    > Thanks,
    >
    > Fred
     
    Patrice, Nov 17, 2005
    #8
  9. Fred

    Fred Guest

    Patrice a écrit :
    > And how many files are you processing ? It looks like it should be really
    > quick...
    >


    I think I have around 3.000 images diplayed 20.000 times a day.
    My Server is PIV 2.8GHz with 1MB RAM.

    I tried different components and the best (by far) is ... php and gd2.

    Fred
     
    Fred, Nov 18, 2005
    #9
  10. Fred

    Patrice Guest

    Nice volume ;-)

    Thanks for following up with the solution...
    --

    "Fred" <> a écrit dans le message de
    news:437d8a56$0$19698$...
    > Patrice a écrit :
    > > And how many files are you processing ? It looks like it should be

    really
    > > quick...
    > >

    >
    > I think I have around 3.000 images diplayed 20.000 times a day.
    > My Server is PIV 2.8GHz with 1MB RAM.
    >
    > I tried different components and the best (by far) is ... php and gd2.
    >
    > Fred
     
    Patrice, Nov 18, 2005
    #10
    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. HNguyen
    Replies:
    4
    Views:
    2,410
    HNguyen
    Dec 21, 2004
  2. Laszlo Zsolt Nagy
    Replies:
    1
    Views:
    1,372
    Kartic
    Jan 26, 2005
  3. =?Utf-8?B?Q2hyaXNGcm9obGljaA==?=

    ASP.NET 2.0 Reading/Writing to SQL 2000 Text DataType Field

    =?Utf-8?B?Q2hyaXNGcm9obGljaA==?=, Dec 1, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    495
    bruce barker
    Dec 1, 2006
  4. iwasjoeking
    Replies:
    9
    Views:
    626
    dorayme
    Jun 10, 2008
  5. Savas Ates

    writing text to an image with asp

    Savas Ates, Jul 19, 2004, in forum: ASP General
    Replies:
    1
    Views:
    244
    Aaron [SQL Server MVP]
    Jul 19, 2004
Loading...

Share This Page