Compress image file from AsyncFileUpload - c#

Is it possible to compress images upon upload directly from AsyncFileUpload? If yes, can you guide me how?
For example: I have a user that uploads an image .jpeg with size 1200x1600 (5MB) and I want to compress it into a 600x800 (1MP~2MB) file. As much as possible I have to do this on client side just before I upload it to server.
Thank you.

You can take a look at DotNetZip library. I think you will find your solution there.

On HTML5 browser, you can use the solution in this answer, otherwise you're stuck with requiring your client to use a plugin (Java, Flash, Silverlight) etc.

Related

Convert HTML with SWF to Pdf or JPG

My aim is clear. I would like to convert(capture) websites from given url which is HTML page with SWF included to PDF or JPG file.
I need to do it as a batch operation so lib or SaaS is ok for me.
Could anybody recommend any third party solution? It could be library or for example service in the cloud. It can be paid of course.
What I was trying are for example:
EVOPDF library which required flash player to work but I cannot install flash on the server cause of it is security risky.
cloudconvert (BETA) does not work (swf container is empty)
PrinceXml does not support
web2pdfconvert.com does not work (swf container is empty)
and many others with no results..
If you cannot install flash player how do you expect to capture the SWF data? You need to be able to draw the SWF or it will always be blank.

Best way to display pdf document in asp.net application

I'm looking for the best way to display pdf document on a website. Surely I need to convert it to jpeg or gif for the browser to handle it. I read few posts but most refer to GhostScript and its pdf2image. But that solution calls for starting a process that would save a copy of pdf doc to the file system and then would have to be loaded back into memory for displaying. Frankly I find it a bit clumsy. For those of you who have done it, what library you used and if you could attach a link to some examples, I'd greatly appreciate it.
I'm developick a web application that helps manage manufacturing process and is accessed fron android tablets. Company has a stockpile of documentation in pdf files that is to be delivered to production managers. I'd love the solution to be akin Crystal Report Viewer contron but I I understand that I have to stick to pdf to image conversion. Please give me some advise here.
My advice is don't over think this.
You can simply add a link to the PDF file, which will open on a new tab.
You can take a look at http://mozilla.github.io/pdf.js/ which will allow you to render a PDF on the client side.
Or if you decide to go with a Ghostscript, you can take a look at http://ghostscriptnet.codeplex.com
By all accounts the PDF Focus .NET library seems to be the best solution. A wrd of advice is to add a cleanup method to the page unload to delete all temporary files that were used to feed source into image controls when displaying pictures on a website.

Upload large file in asp.net

I want to upload 30GB with asp.net file upload control, i have heard that ftp can do this or some advanced uploader. I searched but did not find any suitable code or some open source plugin for asp.net. Do you know some library or whats the right way to do this, i am confused.
I am in search of ASP.Net file upload which could upload large file e.g 30GB, and with any logic like ftp or some other resuming way. So is there any plugin which can do this job?
I don't think you can do this. Many browsers have upload limit ~ 2GB. Think about different solution than HTTP POST, e.g. direct FTP upload.
Here is a pretty good writeup of the problem
http://weblogs.asp.net/jgalloway/archive/2008/01/08/large-file-uploads-in-asp-net.aspx
In my own experience working with gigabyte uploads in .net several years ago, it is not easy within the common controls and infrastructure. You will be fighting http timeouts, and have to adjust the web.config to allow for the file size and changes a bit in web.config.
What has to happen to make it work is some form of chunking. So you divide the file up into much smaller pieces and then attempt to upload each one. Then you will have to keep track of which pieces you have gotten and which you have not.
A better/easier solution is to add some RIA functionality to your application so you can handle the upload in
You could try NeatUpload http://neatupload.codeplex.com/. I've used it last time for uploading files as large as 10MB without problems. Never tried it with multi GB files though.
The control requires full trust.
I think the best should be WebDAV server engine approach http://www.webdavsystem.com/server/documentation/large_files_iis_asp_net

Extract images from SWF file

Is it possible to programmatically extract image files from a SWF file using C#? If so, how would I go about doing that? I know this question doesn't have a lot of detail but I'm just getting started on this and know very little about Flash. Just need some direction on how to go about this. Thanks.
Take a look at this SWfDotNet flash decompiler library
SWfDotNet
check swf file format spec, Bitmaps, from page 147

upload image file without post back in asp.net

Does anybody know how can I upload an image file in a specific folder without post back
using c# .
There is no way to do this. But you can accomplish it using AJAX. Take a look at jquery and some it's plugins, for example jQuery File Upload Plugin
You could use flash and an HttpHandler to prevent the requirement for a postback.
I have use this example in the past: http://www.codeproject.com/KB/aspnet/FlashUpload.aspx

Categories

Resources