473,802 Members | 1,988 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Writing a text on an image with ASP ?

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
Nov 22 '05 #1
9 2280
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" <fr****@plansde reseaux.com> a écrit dans le message de
news:43******** *************** @news.wanadoo.f r...
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

Nov 22 '05 #2
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 22 '05 #3
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

<pa**@bullschmi dt.com> a écrit dans le message de
news:11******** *************@g 14g2000cwa.goog legroups.com...
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 22 '05 #4
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
Nov 22 '05 #5
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" <fr****@plansde reseaux.com> a écrit dans le message de
news:43******** *************** @news.wanadoo.f r...
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

Nov 22 '05 #6
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
Nov 22 '05 #7
And how many files are you processing ? It looks like it should be really
quick...

--

"Fred" <fr****@plansde reseaux.com> a écrit dans le message de
news:43******** *************** @news.wanadoo.f r...
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

Nov 22 '05 #8
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
Nov 22 '05 #9
Nice volume ;-)

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

"Fred" <fr****@plansde reseaux.com> a écrit dans le message de
news:43******** *************** @news.wanadoo.f r...
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

Nov 22 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2175
by: news.skynet.be | last post by:
Hello, pretty new to java so bear with me. I am trying to write an image over an HttpURLConnection. I have an example of how to write text but I am having real problems trying to write an image, just can't get my head around it. I have succeeded in writing to the local HD using ImageIO: //start image output FileOutputStream fo = new FileOutputStream("myImg.jpg");
8
1433
by: Richard | last post by:
I am slowly understanding how this all comes together and feel it is an answer to my needs. By using a form with an image as my input, I can assign a value to the image. That I can not do with an image alone. What I need to know is, what do I need to use in replace of the alert(msg) so that the larger image and description appear below the thumbnails as desired? switch(buttonName.value) {
9
2901
by: Robby Bankston | last post by:
I'm working on some code and am running into brick walls. I'm trying to write out Javascript with Javascript and I've read the clj Meta FAQ and didn't see the answer, read many similar posts (with no luck though), and searched through the IRT.ORG Faqs (www.irt.org/script/script.htm). The Javascript is designed to open an popup window and then inside that window call another script which will resize that window. There may be another...
17
7686
by: Eric Lindsay | last post by:
Is learning to write CSS a better use of time than finding and using a package that produces complete web pages? I've moved to a new platform (Macintosh), taking with me about 400 personal web pages, some dating back so far I probably wrote them in vi. About 4 years ago (thanks in part to hints found in this group) I converted about 80 pages to CSS, and was fairly happy with the result, plain though they are. Since then I've forgotten...
3
18966
by: nicolasg | last post by:
Hi, I'm trying to open a file (any file) in binary mode and save it inside a new text file. After that I want to read the source from the text file and save it back to the disk with its original form. The problem is tha the binary source that I extract from the text file seems to be diferent from the source I saved. Here is my code: 1) handle=file('image.gif','rb')
0
1742
by: Khadim | last post by:
Hi, I am facing a problem in my application. I have an image on which there are many numbers present. I can find the pixel position of the center of those numbers. Now I have the names of those numbers in seperate file which I have to write to corresponding numbers. I rotate my image on 45 degrees with point to rotate 30 pixels on top left which shows my text on 45 degrees on top left. Writing this doesn't gives my much trouble.
1
2371
by: Glenn Coyle | last post by:
Hi I am having trouble writing the file path of a image to the database,also for some reason it is not uploading the images, anyone have any ideas? the code is below: if($_POST == 'Submit') {
3
5967
by: KDawg44 | last post by:
Hi, I am trying to write a page that creates some barcodes using the PEAR Image_Barcode module. I am getting one barcode to write just fine but it will not print out any more than one and will not print any text on the page. What I would like is to pass in the information to be barcoded, and a category for each barcode, then have a page displayed that groups the barcodes by category.
2
2331
by: ThatsIT.net.au | last post by:
I have this code that writes a pie chart in a asp.net page, but I want to use it in a server control. When I try I get a error on the last line "Response.OutputStream" Obviously there is no response object but how do I write it to screen? Dim objBitmap As New System.Drawing.Bitmap(400, 440) Dim objGraphics As System.Drawing.Graphics objGraphics = System.Drawing.Graphics.FromImage(objBitmap) objGraphics.Clear(Drawing.Color.White)
6
7526
by: bradyounie | last post by:
I'm writing a program that displays a user-supplied Bitmap and then writes text fields to it. These "text fields" are things that the user can move around on the image, but to render them efficiently, I draw the text directly to the image. It's faster that way. The problem is that right now I have to redraw the original (unwritten-to) bitmap and redraw the text whenever the user moves the text because I haven't figured out how to properly...
0
10538
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10305
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9115
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6838
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5494
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4270
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3792
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2966
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.