I have a script which resizes images, I did not write this script, nor do I know any ASP.NET, but I have been assigned the task of fixing an issue with it!
The problem is, the resulting image from the resize appears to be of less quality than the upload, even if the file uploaded is already set to the correct size.
Uploaded image - [URL]
Resized image - [URL]
The script that is doing the resizing is as follows, how to correct the issue?
I am developing an ASP.NET 3.5 web application in which I am allowing my users to upload either jpeg,gif,bmp or png images. If the uploaded image dimensions are greater then 103 x 32 the I want to resize the uploaded image to 103 x 32. I have read some blog posts and articles, and have also tried some of the code samples but nothing seems to work right.
I have uploaded a .jpg image and resized as Small and Large thumbnail. The small image is (135 X 173) but after resizing the small thumbnail image file size is of 40.8 KB. And mostly all images (around 64) thumbnails having file size more than 40 KB. Due to which thumbnails taking lot of time to get display.
Is there a way through which we can reduce the image file size upto 8 to 12 kb, but without effecting image quaity??
Below is the source code that i am using for resizing an image:
If FileUpload1.HasFile Then Dim stream As Stream = FileUpload1.PostedFile.InputStream Dim x As String = IO.Path.GetExtension(FileUpload1.FileName).ToLower If x = ".jpg" Or x = ".jpeg" Then Dim image As New Bitmap(stream)
I am trying to upload large videos(more than 1GB) to youtube from webpage. But youtube is allowing me to upload max 8MB videos. So I want to reduce the size of the video and then upload the reduced video to youtube. So, how to reduce the video size.
I'm using iTextSharp to print a PDF document. Everything goes ok until I have to print the company logo in it.
First I noticed that the logo had poor quality, but after testing with several images, I realize that was the iTextSharp rendering it poorly.The test I did to say this was to print the PDF using my code and then edit the document with Acrobat 8.0 and I drew an image. Then printed the two documents and saw the noticeable difference.My question is that if anyone know if this can be due to a scaling problem where I'm failing to tell iTextSharp how it must render the image or is an iTextSharp limitation.
The code to render the image is the following:
[Code]....
The method ResizeImage() do the resizing of the width and height respecting the aspect ratio and keeping in a max width and a max height limits.
For simplicity lets say that I have a web page that needs to display thumbnails of images. The images locations are stored in a database(the images are stored on Amazon S3). Is it possible to have my web server scale down the large image before it is delivered to the client? This way I don't have to store thumbnails of every image and the client can download a smaller file.
I am looking c# code which creates better quality higher resolution thumbnail image. i am having an image of dimension(600 * 900) and i need to create thumbnail of dimension (100 * 100) with high quality.
I found some code that resizes an uploaded image ( stream ) to a pre-determined size. Using this code, it works perfectly..
Code: ' make sure we have a file . If FileUpload3.HasFile Then Dim name As String = FileUpload3.PostedFile.FileName Dim Justname As String = Path.GetFileName(name) Dim length As Integer = FileUpload3.PostedFile.ContentLength
[Code] ....
What I'd like to do is move this code into a Class so I can call it from other pages, so I created a class and added this code...
As you can see, I'm trying to pass in a stream and defined width, and I want it to pass back the image ( if the size if greater than what I expected.
I'm trying to call the class like so.
Code: ' make sure we have a file and that we have an ID to set it to. If FileUpload3.HasFile Then Dim name As String = FileUpload3.PostedFile.FileName Dim Justname As String = Path.GetFileName(name) Dim length As Integer = FileUpload3.PostedFile.ContentLength
[Code] ....
Don't worry about the cc.imgStr this is just the path to my class which is defined futher up.
The Error I get is "Value of type system.io.stream, cannot be converted to ' 1 dimensional array of byte' "...
I have ASP.NET form with an upload control for users to post an image. On the server I load that image (using the Bitmap class) and resize it. Is there any danger in doing that when users upload malicious or affected files or will the code just throw an exception at some point and stop the whole process?
In trying to upload images to a server, I often get the following error "Maximum request length exceeded.".
I have tried to check for the size in codebehind but it appears that the error comes from the service provider or something else because I never even get to debug it since the error appears even before the Page_Init Subroutine in codebehind.
What is the best method of checking for the image size and then resizing it dymamically to a maximum file size as well as length and width size.
I have a photo on my server image1.jpg in high resolution, and I need it to be resized everytime it is send to client depending with dimension I put but should not make extra file on disk.
I used aspjpeg for this in past but now I need something that can be used on servers that do not have aspjpeg instaled.
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: The server tag is not well formed.
I am using asyncfileupload ajax control and can successfully upload and save picture on server.I need to do the following and not sure how:When user is in process of uploading, I only want them to see *.jpg *.gif and *.bmp files Once the user uploads their picture, how do I reduce the quality of the picture so it is less than 10 KB?
In the Java world for instance, there are some very sophisticated tools to manage the quality of the source code, and that cover more than one dimension, such as :
Coding Rules Comments Complexity Unit testing Code coverage etc.
These tools are very useful to manage the technical debt. They connect to a repository of source code and scan it. They can be triggered automatically just by the fact of committing the source code.We have a large number of ASP.NET applications to maintain and evolve, and have continuous flow of demands for new ones to be created. We know that we have a technical debt, but we are facing some challenges of identifying it and having it under control.
there are some tools to manage the source code quality in ASP.NET applications like those mentioned above.
In our project We made reports with the method that return as a datatable from a class with dynamic sql.
Nowadays, we think to migrate to more professional technic for our reports. For this purpose I examine crystal report and devexpress' XtraReport components.
However, I Couldn't decide which component and method(dynamic sql, stored procedure etc.) should I use.
how to get the best software to use for the following?
(i) Web graphics: Apart from Photoshop what is the best easy to use program (minimum learning curve)for producing quality drawings suitable for a website?I know that there are many graphic programs around but I want one that is easy to use and produces QUALITY drawings.
(ii) Animations: Similarly I am looking for an easy to use animation program. I have used Flash before but I feel that there is a steep learning curve. Is there a better program out there?
I'd like to setup some lunch-and-learn sessions in my company where we all watch a presentation of some programming-related topics. Where are some good places to find videos about Microsoft technologies with a clear picture and high audio quality that are about 30-60 minutes long?
They could be about design patterns, best practices, new language features, new frameworks, getting better performance, etc.
I am uploading images in c# windows application. I am uploading the images folder wise. In one folder there are 200 to 3000 images. My one images size is about 3.10 MB to 6.2 MB. Its dimensions are 3008 x 1960, 1960 , 4000 x 2600. 6000 x 4000 . while uploading i am reducing the size of image to 400 x 266 or 266 x 400 depending on the height and width of image. but still my image size is about 227 KB. Now i want to reduce the image resolution to decrease the image size.