Image cropping like facebook - c#

For those that have been on facebook it allows you to upload an image to use as your avatar, and if that image is too large you can drag it around in a container to set the co-ordinates of the crop.
Can anyone Help me out to implement this functionality in c# ASP.NET

Probably this will do the job for you
http://webcropimage.codeplex.com/
For writing your own image cropper, study the source code of that.

This will be mostly client-side. You can take a look at something like Jcrop.

the best resource on this issue is here.
http://blog.mironabramson.com/blog/post/2009/04/Cropping-image-using-jQuery%2c-Jcrop-and-ASPNET.aspx

It does not provide exactly what the question asks for but I think Image Resizer is something you should look at.
http://www.imageresizing.net/

Related

Convert a div and contents inside it to image

I have a DIV container which has some text, background-image, image. I need to convert that whole DIV contents into image and save.
I have googled it around but could not find the perfect answer. some are giving answers that uses a windows application , but i need it on a web platform .
any help will be highly appreciated
From what I understood, you have to do that in the client side, so you should take a look at the toDataURL method of the canvas.
If you don't know, the canvas support text and image.
Example and little library at this link:
http://www.nihilogic.dk/labs/canvas2image/
http://html2canvas.hertzen.com/
Does't support IE though. Looks solid other than that.
This is possible, with modification to the code here http://html2canvas.hertzen.com/screenshots.html you could perform the required screenshot :)

How to create edit thumbnail feature as in facebook(while uploading display image) in Asp.net using c#?

I want to upload an image and want to show a particular part of image in the thumbnail of particular size. I want to customize the thumbnail look.
I think it is a combination of an ASPX page, some jQuery plugin like Image Crop (http://www.webresourcesdepot.com/jquery-image-crop-plugin-jcrop/) and a handler which accepts the changes made to the image using an AJAX call.
I think it would be pretty easy as long as the jQuery plugin supports the right events. Jcrop supports an onChange event, which you could use to send certain coordinates to a handler.
Edit: Someone already did this and wrote about it: http://www.omerfarukzorlu.com/post/ASPNET-Image-Croper-Component-with-JCrop.aspx
PS. Not sure about the downvoting. It is a new user, but StackOverflow does not supply complete solutions for most cases, but just tips and pointers to find the solution yourself.

How can I generate video dynamically in ASP.NET

I need to convert a series of PNG files into a video animation (avi or mpeg). Can this be achieved with C# in asp.net?
Maybe you can take a look at the Splicer Project. You might also want to take a look at this previous SO thread for more information.
ASP.NET isn't a tool designed for generating avi or mpegs from images. You'd be better off with a tool (open source or commercial) specifically designed for such a task.
It can be done in .NET, but in my personal opinion, the effort isn't worth the outcome. The ROI just isn't there when so many good tools already exist.
However, if you're looking to build a slide show, then you can use the SlideShowExtender in the Ajax Control Toolkit.

asp.net screenshot

I need to work on a new feature where a user can make a screenshot of the content in the browser via asp.net page and save it automatically as jpeg. Is there a example or someone can give me some idea how I can do that?
I will really appreciate.
Thanks in advance, Lazile
The long and short of it is that you'll need to render the page on the server and take a picture of it. Depending on your format needs, there are a variety of ways to do this.
Here's a link to a tutorial for getting a snapshot in jpg, bmp, png, etc.
If you need to get it to pdf format, I would recommend either using a program like wkhtmltopdf, or using the information from the tutorial and then pasting that image into a pdf.
check this out. It's javascript on the client side. It might meet your needs with some tweaking.
Edit: caveat is that it doesn't work in <IE9 as it uses HTML 5 canvas.

How to load .dds files into a picturebox?

How do I load .dds texture files as an Image in C#? There's nothing useful on google that I could find.
The more information with samples you give me,the better it will be for me to understand it.
I had the same issue. Here is a good solution.
Source: http://www.mastropaolo.com/devildotnet/
Download Version 1.3 from that link (bottom of page)
Add the Devil.NET.dll as a reference to your application
Use the code that I have supplied below.
PictureBox1.Image = DevIL.DevIL.LoadBitmap(DDS_File_Path)
It's really that easy. We owe the DevIL .NET Wrapper creator a beer.
I think the short answer is that you don't. The documentation says that the supported formats are BMP, GIF, EXIG, JPG, PNG and TIFF.
Update: there seem to be a number of converters to be found through Google, that might help you out. Also, as Wayne suggests, look at XNA (if you didn't already). The Texture2D.FromFile method seems to handle the .dds files, but I never used it myself so I can't say if it is what you are looking for or not...
You might want to take a look at the Microsoft's XNA Game Studio SDK to load the textures in memory and possibly capture the images in a System.Drawing.Graphics usable way.

Categories

Resources