I have the following requirement wherein I have to implement a paint brush kind of feature in a asp.net web application. Basically it should support resizing, drawing lines, squares, etc and a whole lot of features like a paint brush. I was googling out image processing libraries in internet.
I found some - but the problem is most of them is with flash. I was looking for some option without flash since the application should run on a ipad also.
Can you people suggest some good image processing libraries which I can use in my asp.net (using C#) application.?
I have done good enough research regarding them. I do not have much time to download the trial versions and try each and every library. So I need the help of you all to suggest me something based on experience.
For the Image Resizing and cropping you can use Image Resizer and for drawing lines, squares, etc you should use HTML5 Canvus.
There are a lot of good libraries and tutorials for HTML5 Canvus.
Its easy to use and is available at Nuget.
var settings = new ResizeSettings {
MaxWidth = thumbnailSize,
MaxHeight = thumbnailSize,
Format = "jpg"
};
settings.Add("quality", quality.ToString());
ImageBuilder.Current.Build(inStream, outStream, settings);
resized = outStream.ToArray();
You can install it using Nuget
PM> Install-Package ImageResizer
you can use AForge.NET, a C# framework, here is code project link :
http://www.codeproject.com/Articles/16859/AForge-NET-open-source-framework
Related
tileItemElement5.ImageAlignment = DevExpress.XtraEditors.TileItemContentAlignment.TopCenter;
tileItemElement5.ImageScaleMode = DevExpress.XtraEditors.TileItemImageScaleMode.ZoomInside;
tileItemElement5.ImageSize = new System.Drawing.Size(200, 135);
Here I want to assign an image to my tileItemElement5. I don't know how to do that
Looking at the documentation for DevExpress WinForms, you can just assign an image directly to the TileItemElement.
tileItemElement.Image = Properties.Resources.delete_icon;
You can get the image from your Properties/Resources as I did in the short example, or load it in code.
Link to the documentation and a tip
DevExpress provides a very detailed documentation with lots of examples, I recommend that you utilize your search engine next time because 99% of the time, you will find an answer on their website.
Because DevExpress provides libraries for multiple platforms and frameworks, I recommend that you preface your search engine search with "DevExpress C# WinForm" then type in the issue or what you are looking for. This will make sure that you get results that match your development environment.
I'm doing a project on ASP.Net, whose task is to work with images.
So, I need to make the client part of whose tasks will include:
cropping, rotating, resizing.
I saw this topic, but solution are too complicated for my problem (I have only 3 functions, not online version of Photoshop).
Could you give me a free solution for JS?
means that the sending result-image will be executed in Ajax.
Desirable,that solution should support Ie8+.
It is not free, but Telerik has an Image Editor
for ASP.NET AJAX.
Full disclosure: I'm the author of StudioJS
StudioJS (MIT-licensed), (see demo) offers cropping, rotation, flipping, saturation, contrast, brightness adjustment, white-balance correction, and a number of image effects.
It uses ImageResizer (of which I am also the author), to do the back-end work. The ImageResizer core, resizing, cropping, and rotation is free, but the image effects and adjustments require a license. Everything is on GitHub.
If you build your own solution, check out my list of avoidable pitfalls. It can be a bit tricky.
You can use a JavaScript free component to edit the image and convert it to base64 , then it will be ease to save this base64 as a server side code to physical file image
Javascript code :
http://cssdeck.com/labs/xnmcokhc
or by the same way there are many other JS options too in below link
http://www.jqueryrain.com/demo/jquery-crop-image-plugin/
You could use an online editor such as Pixlr. I read it has an API so that you can set it up to work with your web application.It has the features you want, and also many more.
To have your own JS editor, I haven't found something ready available online but could make one of your own.
You could use the imgAreaSelect plugin (is used in WordPress) to make the client side part of the crop function. For the server side part, I have written this article some time ago to describe how a crop function works. You could adjust it to work with the imgAreaSelect plugin. If Pixlr doesn't suit you, let me know so that we can talk more about the second scenario.
So, I've created a SimpleImageEditor for my Project.
I've used ImageAreaSelect for cropping and fc-ImageResizer for resizing.
For display I use Bootstrap 3.0.
https://bitbucket.org/Dr-klo/simpleimageeditor/
I've found this. However it is for php, does an equivalent library exist for asp.net?
Is there anything similar to this for ASP.net that mimics the kind of filters you'll find on instagram?
I've recently found AForge.net which amongst many things will do image processing and has a select amount of basic filters I believe will be able to achieve what I need it for. The docs on there site are also really good.
To apply a Sepia filter to an image:
Bitmap bmp = new Bitmap(pathToImage);
Sepia filter = new Sepia();
filter.ApplyInPlace(bmp);
I load an image in my web application using the following code :
Bitmap oCanvas = (Bitmap)Bitmap.FromFile(Server.MapPath("Images\\2.jpg"));
Graphics g = Graphics.FromImage(oCanvas);
Response.ContentType = "image/jpeg";
oCanvas.Save(Response.OutputStream, ImageFormat.Jpeg);
Response.End();
g.Dispose();
oCanvas.Dispose();
Now how to write on this image by mouse and save the result as an image ?
In order to let the end user write on the image using his mouse, you need a client-side ActiveX control on your page. That will only work on Windows PCs and it can get pretty complicated quickly.
Another option would be to host the image in a Flash application, which could run on all platforms (except iOS :-) You can find an example of that here: http://active.tutsplus.com/tutorials/games/create-a-basic-drawing-application-in-flash/
And yet a third option would be to use an HTML5 Canvas + client-side JavaScript. Not all browsers support the HTML5 (pre-)standard yet. A good example you can find here: http://www.williammalone.com/articles/create-html5-canvas-javascript-drawing-app/#demo-complete, and another one here: http://www.codicode.com/art/how_to_draw_on_a_html5_canvas_with_a_mouse.aspx
Good luck!
I am looking for a solution (APIs, etc.) for handling a similar experience as cafepress.com. I need to be able to upload images (preferably multiple at a time) and be able to map my uploaded images to various product images (clean stock images of shirts, mugs, etc.). I also want to give the user some very basic controls over the images they upload such as cropping, resizing, levels, etc. Any suggested libraries or APIs would be greatly appreciated. I am looking for .NET solutions (if server-side). I am not looking for how to tie this all together but rather some suggested libraries or tools to build out some of this functionality.
Note: If this is not the place for this type of question, please move accordingly or suggest an alternate site.
Frankly, I don't think you are going to find what you are looking for specifically, unless you are looking at using a full on CMS of some form. Frankly, those problem domains are too far apart. Instead you should probably look at them as individual pieces.
So far as upload controls exist, there are probably close to 100, some free some not so free. Personally, I already have a Telerik subscription, so it was a no-brainer for me, but Rad Upload works well and supports multiple uploads. Free implementations are available.
The cropping and post image handling tasks ( at least the ones you have listed ), can easily be handled using standard System.Drawing.* calls, or if it gets more advanced a ton of free libraries exist, like the age old ImageMagick, but there are a number of commerical libraries available as well. Chances are though, the inbuilt libraries will be more than sufficient.
Finally the mapping to products should be handled by your business layer ( aka, code you write ) as it is going to be so specific to your app.
However, if you are looking for a storefront or CMM with a multiple image upload control, that is a very different question with many options as well, both free and commercial.
use openCV. you can find it here: http://opencv.willowgarage.com/wiki/
you can use this library perfectly with c++.
if you need to use it in C# use this wrapper: www.emgu.com/wiki/index.php/Main_Page