Writing a text on an image with ASP ?

F

Fred

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
 
P

Patrice

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.
 
P

paul

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
 
P

Patrice

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...
 
F

Fred

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
 
P

Patrice

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.
 
F

Fred

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
 
P

Patrice

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

--
 
F

Fred

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top