Rank: Member
Groups: Member
Joined: 11/22/2006(UTC) Posts: 13
|
Hi
I am trying to use the watermark image option for asp.net (VB) but all example code I can find is either in Java or C.
Does anyone have a working example of the watermark image upload for asp.net (VB)
thanks |
My First and only Asp.net site
<a href="www.fusic.co.uk">FUsic.co.uk</a>
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
Hi Chris,
I have just took a look into distrib. As far as I can see ASPNET_VB folder contains a Watermark demo app. This demo is written on VB.NET.
Do you have any problems with it?
|
|
|
|
Rank: Member
Groups: Member
Joined: 11/22/2006(UTC) Posts: 13
|
Does the watermark demo have the watermark image code in it? I can't seem to see it in the code?
I would like to add an image to the bottom right corner of the uploaded images. Is there such a demo or example?
Thanks |
My First and only Asp.net site
<a href="www.fusic.co.uk">FUsic.co.uk</a>
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
Yes, sure. Watermark settings are specified by the UploadThumbnail1Watermark (UploadThumbnail2... and UploadThumbnail3... as well). If you want to insert a static text, you can just add this param among others like this: Code:iu.addParam("UploadThumbnail1Watermark","position=BottomRight;" + "opacity=100;text='Watermark text'");
In case of dynamic text, you can add watermarks in BeforeUpload event handler as demonstrated in that demo (it takes a text from the input field called Author): Code:function ImageUploader_BeforeUpload(){
//Use author name as a watermark. To do it, initialize the
//watermark string of Thumbnail1.
//
//NOTE: The quote character (') in watermark text should be replaced by
//doubled quote character ('').
//Otherwise Image Uploader will not be able to parse the watermark string.
getImageUploader("ImageUploader1").setUploadThumbnail1Watermark("opacity=100;" + "size=30;text='" + document.getElementById("Author").value.split("'").join("''") + "'");
}
For more information about all possible variables for a watermark string refer the documentation: http://www.aurigma.com/r...dThumbnailWatermark.aspxAlso, you can look into the following manual article for information how to work with watermarks (it demonstrates image watermarks, but there is no a big difference: http://www.aurigma.com/d.../iu/AddingWatermarks.htmHope this helps. Edited by user Wednesday, October 29, 2008 2:01:40 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Member
Groups: Member
Joined: 11/22/2006(UTC) Posts: 13
|
Hi
I had found this but tried it and I keep getting a server side error. Do you have a full example or tips on where to put the code within Default.aspx and Upload.aspx
Thanks |
My First and only Asp.net site
<a href="www.fusic.co.uk">FUsic.co.uk</a>
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
JavaScript code snippets I posted in previous message was for Default.aspx. If you did not change anything in demo apps and get server-side errors, most likely they are caused by insufficient permissions or something like this. Make sure that you have specified all necessary permissions for the folder you save files to: http://www.aurigma.com/docs/iu/ASPNETSamples.htmAlso, take a look into Troubleshooting section of this article. It also may be helpful. Edited by user Wednesday, October 29, 2008 3:09:31 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Newbie
Groups: Member
Joined: 4/10/2013(UTC) Posts: 1
|
this is a method i can find for adding watermark to images.Imports System.IO Imports System.Drawing.Printing Imports RasterEdge.Imaging Imports RasterEdge.Imaging.Processing Dim Image As New RasterEdgeImaging() 'Create an instance of Image and load an existing image Using image As Image = Image.LoadImageFromFile("C:\1.bmp") End Using If True Then Dim graphics As New Graphics(image) Dim font As New RasterEdgeImaging.Font("Times New Roman", 16, FontStyle.Bold) Dim brush As New RasterEdgeImaging.Brushes.SolidBrush() brush.Color = Color.Black brush.Opacity = 100 image.CreateWatermark("watermark", font, brush, New PointF(image.Width / 2, image.Height / 2)) image.Save("C:\1-watermark.bmp") End If
|
|
|
|
Rank: Advanced Member
Groups: Joined: 12/19/2012(UTC) Posts: 164
Was thanked: 8 time(s) in 8 post(s)
|
Hello carolinenew,
Thanks for your comment!
Feel free to contact me if you have any questions. |
Best regards, Vitaly Kustov Aurigma Technical Support
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.