How to insert watermark on the picture

vadkos12

Новичок
Регистрация
02.03.2014
Сообщения
28
Благодарностей
1
Баллы
3
Could someone help me to find decision to join some text variable from project and image.
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
There are no options for this in software itself. I suggest you to google for imagemagic and how tpo watermark with it pictures with C#
 

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28

vadkos12

Новичок
Регистрация
02.03.2014
Сообщения
28
Благодарностей
1
Баллы
3
Thanks for offers. I need C# because of watermarks have to get by chance.
Cause of this I'm trying to figure out in the C# syntax.
 

vadkos12

Новичок
Регистрация
02.03.2014
Сообщения
28
Благодарностей
1
Баллы
3
I found the Watermark assemble, and successfully added with GAC reference, but can't declare this class.
Assemble here: http://easywatermark.ru/EasyWatermarkLib
EasyWatermarkLib with XML-comments (IntelliSense)

I have saved EasyWatermarkLib.dll in the C:\Program Files\ZennoLab\ZennoPoster Standard\Progs\ExternalAssemblies
and after that added in the GAC


But the code return error:

using EasyWatermark;
// loading watermark template
Pattern p = new Pattern(@"C:\template.xml");
// put watermark to image C:\image.jpg
// setup fixed dimensions of image 500x500px you can use 0 for auto size / for example 500, 0
Image watermarkImage = p.GetImage(@"C:\картинка.jpg", 500, 500);
// save image with watermark to file C:\test1.jpg
watermarkImage.Save(@"C:\пример1.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);


"Syntax error, '(' expected". [Row: 1; Column: 7]
") expected". [Row: 1; Column: 20]
"The type or namespace name 'Pattern' could not be found (are you missing a using directive or an assembly reference?)". [Row: 3; Column: 17]
"The type or namespace name 'Pattern' could not be found (are you missing a using directive or an assembly reference?)". [Row: 3; Column: 1]
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
using EasyWatermarkLib;
EasyWatermarkLib.Pattern p = new EasyWatermarkLib.Pattern(@"C:\template.xml");
 

vadkos12

Новичок
Регистрация
02.03.2014
Сообщения
28
Благодарностей
1
Баллы
3
using EasyWatermarkLib;
EasyWatermarkLib.Pattern p = new EasyWatermarkLib.Pattern(@"C:\template.xml");
Hi, bigcajones
S
till the same errors.
"Syntax error, '(' expected". [Row: 1; Column: 7]
") expected". [Row: 1; Column: 23]

in case if i put ()
the next error come
"'EasyWatermarkLib' is a 'namespace' but is used like a 'variable'". [Row: 1; Column: 8]
 

vadkos12

Новичок
Регистрация
02.03.2014
Сообщения
28
Благодарностей
1
Баллы
3
btw,

The same thing if i declare system class

using system;
"Syntax error, '(' expected"....
...
 

darkdiver

Administrator
Команда форума
Регистрация
13.01.2009
Сообщения
2 284
Благодарностей
2 728
Баллы
113
you can't write using directly in C# macros. There is a special static block for usings.
upload_2014-5-26_12-46-13.png
 

vadkos12

Новичок
Регистрация
02.03.2014
Сообщения
28
Благодарностей
1
Баллы
3

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)