 |
|
 |
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
int borderSize = 20; //Determines how big is the outside border
Image myImg = Bitmap.FromFile("cat.jpg");
//Sets up a background image, a little bit bigger than the original image
Image back = new Bitmap(myImg.Width + borderSize, myImg.Height + borderSize);
Graphics g1 = Graphics.FromImage(back);
g1.FillRectangle(Brushes.Lime, 0, 0, back.Width, back.Height); //color the back
Image transformedImage;
ZRLabs.Yael.BasicFilters.RoundedCorners rc = new RoundedCorners();
rc.CornerRadius = 20;
rc.BackGroundColor = Color.Lime; // the same color as the back !!
transformedImage = rc.ExecuteFilter(myImg);
g1.DrawImage(transformedImage, new Point(borderSize / 2, borderSize / 2));
rc.BackGroundColor = Color.Black;
transformedImage = rc.ExecuteFilter(back);
transformedImage.Save("cat_border.png", System.Drawing.Imaging.ImageFormat.Png);
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.
|
|
|
|
 |
|
 |
Sorry I can't compile the code as it asks me me for a password "Import Key File" for zrlabs.pfx.
What do I need to do?
Have a nice life!!
|
|
|
|
 |
|
 |
Are you using Visual Studio 2005 ?
|
|
|
|
 |
|
|
 |
|
|
 |
|
 |
It's good now! Thanks!
Have a nice life!!
|
|
|
|
 |
|
 |
As you were asking for it
1) A "Colorize" filter, that would allow to "tint" the photo to any color.
2) Setting the alpha channel to a specific value (transparency)
3) Flip vertically/horizontally
|
|
|
|
 |
|
 |
Sure, will keep it on my next version's list.
Thanks for the feedback.
Roiy
|
|
|
|
 |
|
 |
Nice image library with some nice filters/effetcs, however I really do think that a Crop feature is very much needed.
If there was a Crop feature the Library could be used to e.g. "Clip'n'Resize" images in e.g. a Photo Album Gallery application, however without the Crop feature this is not possible.
Are you planning to implement a Crop / CropAndResize method in the near future?
Best regards,
Michael Holm Andersen
|
|
|
|
 |
|
 |
Cropping is quite easy using the built in .Net Graphics.DrawImage(Rectangle..), but I can see it handy having a wrapper in this library for this task as well. Will be introduced in the next release. Thanks for the fedback.
Roiy
|
|
|
|
 |
|
 |
Now, if you could make a working deskew and crop filters, that would be amazing.
I've got an app I wrote which takes images from my scanner, deskews and crops out the object. The deskew is currently provided by Pegasus ImageXpress component (very expensive) and the crop I had to write myself - it calculates the boundary of the object by scanning the image for differences in image brightness.
I'd love to be able to move to a free solution rather than the Pegasus solution as it restricts my ability to distribute my application for free, which I'd like to do.
|
|
|
|
 |