|
I'm happy to tell that a small set of the filters in this project are available online at www.imgtoys.com[^]
Currently the available filters are Text Watermark, Floor Reflection and an added bonus, EXIF metadata editor.
Check it out at http://www.imgtoys.com
|
|
|
|
|
Working with the filter
Text Captions and WaterMarks
Let's say I want to use a water mark with 2 lines
as if
textWaterMark.Caption = "Pitzi";
and on the bottom line
textWaterMark.Caption = "© 2008";
where the result would be etched on the image
Pitzi
© 2008
As in the code of the filter I change or which character linefeed I put it in the text to skip a line
Regards - Luiz - Brazil
Translated - Portuguese to English by Google
LADEF
|
|
|
|
|
For Dlls or components used in reference to the application they are to use Free or has Validity of Cessation?
Regards - Luiz - Brazil
Portuguese Translated into English by Google
LADEF
|
|
|
|
|
I was working as shown in the routine code below with the filter Rounded Corners Filter
RoundedCorners rounded = new RoundedCorners();
rounded.BackGroundColor = Color.FromArgb(255,52,1,31);
//rounded.BackGroundColor = Color.Aqua;
rounded.CornerRadius = 35;
transformed = rounded.ExecuteFilter(transformed);
and would like to know what the minimum and maximum limits of alpha that can sêr used the data of the line
rounded.BackGroundColor = Color.FromArgb(255,52,1,31);
The reason for this is that my background color in hexadecimal is "# 34011F", if there is a means or method in the line that he recognizes the color in hexadecimal would also be used for the same line
rounded.BackGroundColor = Color.FromArgb(255,52,1,31);
instead of Color.FromArgb
Regards Luiz - Brazil
Translated from Portuguese into English by Google
LADEF
|
|
|
|
|
Dude, I'm sorry , I really tried to understand what you are asking here but it seems that google is not doing such a good job of translating your question. Can you maybe ask someone to help rephrasing the question better ?
Thanks
Roiy
|
|
|
|
|
What I meant to say is on the line
rounded.BackGroundColor = Color.FromArgb (255,52,1,31);
The limit of alpha used is between 0 (more transparent) to 255 (less transparent) or has more than 255 in less transparent
LADEF
|
|
|
|
|
|
Ah ok éra what I wanted to know this issue very much
Regards - Luiz
LADEF
|
|
|
|
|
Working with Drop Shadow filter in dark pages with funds
in images that have in their background colors as escurar
# 34011F, as to make the text on the page with that background color appears a white square around the image
Image transformed;
DropShadowFilter dropShadow = new DropShadowFilter();
transformed = dropShadow.ExecuteFilter(myImg);
Regards Luiz - Brazil
Translated from Portuguese into English by Google
LADEF
|
|
|
|
|
Hello Roy of your code example below
using System.Drawing;
using System.IO;
using ZRLabs.Yael.BasicFilters;
using ZRLabs.Yael.Common.Interfaces;
...
...
Image transformed;
Image myImage = Image.FromFile("c:/input.jpg");
ResizeFilter resize = new ResizeFilter();
resize.Width = 100;
resize.Height = 70;
transformed = resize.ExecuteFilter(myImg);
transformed.Save("c:/output.jpg");
Two questions
1) Insert example of the code in code-behind the VS2005 and added the references above, I am using the ace References v1.0.3.0 (LGPL)
He asks only one name space on the lines
Image transformed;
Image myImage = Image.FromFile("c:/input.jpg");
For the object image, I know what name space that would be?
2) In place of Save the image converted just wanted exibíla for viewing within an object image such as the code below the line
Image1.ImageUrl = ("http://output.jpg"); for example
For this to happen I would have to do instead of using the option
transformed.Save("c:/output.jpg");
which method I would have to put in place do. Save for display only the image of the object within Image1
Thanks and I look forward
Luiz - Brazil
Translated from Portuguese into English by Google
LADEF
|
|
|
|
|
1)You'll have to add System.Drawing.Image (not just for the using line but also for your project references )
2)Didn't understand your question
|
|
|
|
|
What I want to say is that in your project is an example of saving an image in the format because the filter, but I wonder if before saving it for example in any code appeal to show it and link it to a object image as below
Image1.ImageUrl = ( "http://output.jpg") eg
LADEF
|
|
|
|
|
Hello seeing your link seen several examples of examples in ViewCode as below
Image transformed;
RoundedCorners rounded = new RoundedCorners();
rounded.BackGroundColor = Color.FromArgb(255, 255, 255, 255);
rounded.CornerRadius = 30;
transformed = rounded.ExecuteFilter(myImg);
I wanted to know what is taking up these examples where would I put for instance the name of my file of entrada.jpg in that code and picked up where the same file already filtered to switch to a variable in CSHARP, but also where part or event of my page put the mesmo.Estou using VS2005 Pro Edition eng-use
Thanks if you can help me now thank you
This text was translated by Google
LADEF
|
|
|
|
|
Not sure I understand your question.
If you want to load up the original image to the myImg variable, then this is the way to do it
Image myImg = Bitmap.FromFile("cat.jpg");
You can also use the example code in the example solution. You can download the latest version from
[here]
Hope this helps you
Roiy
|
|
|
|
|
That's right thank you and taking advantage Roiy, the examples in your page may sêr used freely in any website that I develop, or lose its operation after 30 days or any time and if I can pass it as an example not to save the image by uploading I believe that this is already in his example I saw the page, but only to see the image or repassá it to a variable such as this would be
Regards - Luiz - Brazil
Translated from Portuguese to English by Google
LADEF
|
|
|
|
|
Roiy,
Thanks for your samples!
Do you have any ideas how to overlay number of images?
Let say I have one image 800x600 as a background and several smalls which I'd like to locate over the background and save as one image.
Regards, Andrei.
|
|
|
|
|
I thought of putting this kind of filter in. I'll probably add it to a future release.
But here is a sample of how to do this in the meantime.
Hope it helps
inputImage = @"c:\temp\cat.jpg";
outputImage = @"c:\temp\cat_out.jpg";
Bitmap bm = Bitmap.FromFile("c:\temp\back.jpg"); //Your 800x600 background image
Graphics g = Graphics.FromImage(bm);
System.Drawing.Image fore =System.Drawing.Image.FromFile(@"c:\temp\cat.jpg";);
//upper left corner starts from 0,0 -> can be changed to whatever you want
g.DrawImage(_img, 0, 0, fore.Width, fore.Width);
bm.Save(outputImage, System.Drawing.Imaging.ImageFormat.Jpeg);
Roiy
modified on Saturday, July 19, 2008 5:53 AM
|
|
|
|
|
I did it like this.
Image myImg1 = Bitmap.FromFile("c:\\image\\image1.jpg");
Image myImg2 = Bitmap.FromFile("c:\\image\\image2.jpg");
Brush backGroundBrush = new SolidBrush(Color.Aqua);
//Bitmap planshet = new Bitmap(800,600);
Size size = new Size(3200, 2400);
Image image = Image.FromFile("c:\\image\\bg1.gif");
Bitmap planshet = new Bitmap(image, size);
Image transformedImage;
Graphics g = Graphics.FromImage(planshet);
// Create graphics path object and add ellipse.
GraphicsPath graphPath = new GraphicsPath();
//graphPath.AddEllipse(100,100, 200, 100);
// g.FillRectangle(backGroundBrush, new Rectangle(0, 0, 200, 300));
g.DrawImage(myImg1, 0, 0, 212,320);
g.DrawImage(myImg2, 220, 0, 212,320);
//g.FillPath(backGroundBrush, graphPath);
transformedImage = planshet;
transformedImage.Save(TransformedFile, System.Drawing.Imaging.ImageFormat.Png);
|
|
|
|
|
Hey,
i tried following example from your website (i changed form c# to vb) ...
Dim transformed As Image
Dim imageWaterMark As ImageWatermarkFilter = New ImageWatermarkFilter()
imageWaterMark.Halign = WaterMarkFilter.HAlign.Top
imageWaterMark.Valign = WaterMarkFilter.VAlign.Right
imageWaterMark.WaterMarkImage = Image.FromFile("Images/pacman.gif")
imageWaterMark.Alpha = 0.3F
transformed = imageWaterMark.ExecuteFilter(myImg)
I use VS 2005 ... but i can`t use the properties imageWaterMark.Halign and imageWaterMark.Valign.
VS 2005 didn´t show me this properties ... what´s wrong ?
Can anybody help me ?
Thanks.
|
|
|
|
|
Hi,
I tried playing with your VB code for a while (not much of a VB coder). and couldn't seen any easy solution to resolve these VB related issues.
Any chance you can cross over to C# ?
Or at least just create a simple C# class that does this functionality for you ?
Thanks
www.dotnetclan.com
Roiy
|
|
|
|
|
Hi,
I just saw your Lib. and I find it excited.
Like you can read in the subject I would like to have rounded corners with an border on an image with a specific color.
Is that posible? How should I do that?
|
|
|
|
|
It isn't possible with the current set of features, I'll try to add it to the next release.
If you can grade this article that would be great.. A high score keeps me motivated to work of newer releases.
Thanks for your feedback.
Roiy
|
|
|
|
|
That sounds good. I just graded the article. Can you give me some hint how to do that, so I can just add it to your project.
Thanks you very much in advance.
|
|
|
|
|
I realized today (while cycling...) that there is a way to do this with the current version.
The trick is to create a bigger image that will set as the background.
round both the corners of your image and the background image and than just copy your original round-cornered image into the background image.
Here is a code snippet
<br />
int borderSize = 20;
<br />
Image myImg = Bitmap.FromFile("cat.jpg");<br />
Image back = new Bitmap(myImg.Width + borderSize, myImg.Height + borderSize);<br />
Graphics g1 = Graphics.FromImage(back);<br />
g1.FillRectangle(Brushes.Lime, 0, 0, back.Width, back.Height);
<br />
Image transformedImage;<br />
ZRLabs.Yael.BasicFilters.RoundedCorners rc = new RoundedCorners();<br />
rc.CornerRadius = 20;<br />
rc.BackGroundColor = Color.Lime;
transformedImage = rc.ExecuteFilter(myImg);<br />
<br />
g1.DrawImage(transformedImage, new Point(borderSize / 2, borderSize / 2));<br />
rc.BackGroundColor = Color.Black;<br />
transformedImage = rc.ExecuteFilter(back);<br />
transformedImage.Save("cat_border.png", System.Drawing.Imaging.ImageFormat.Png);<br />
<br />
Tell me if it works for you ...
Roiy
-- modified at 17:32 Friday 1st June, 2007
|
|
|
|
|
Thank you very much for your fast response.
For now it helps me very good, but for the future it will be better to make the background transparent and not Black like in your post.
I made it white in my application and that means when the background of the web site is not white you can see the white corners.
But thats just something for the future.
Again, thank you very much for your great work.
|
|
|
|