473,513 Members | 10,313 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Retaining highest res. of a image upload for display in C#

rickvidallon
2 New Member
I have a .Net application written in C# where members may upload their photos and have them displayed on our website. We are trying to maintain the best quality using best settings in .Net for this.

A good commercial comparison is as follows;
I uploaded a photo to www.flickr.com. http://www.flickr.com/photos/visionefx/446635882/in/photostream/
The photo contains 73076 kbs. --- When I upload the 'same photo' to our application it saves it at 13076 kbs. That's nice for speed but not very good for quality.

Here is the settings we are using:
:::::::::::::::::::::::::::::::::::::::::::::::::: ::::::
System.Drawing.

Image image1 = System.Drawing.Image.FromFile(Server.MapPath(imgfi lepath + actimgFilename));
System.Drawing.

Image smallimage = new Bitmap (imgNewWidth, imgNewHeight, image1.PixelFormat);

Graphics oGraphic = Graphics.FromImage(smallimage);
oGraphic.CompositingQuality =

CompositingQuality.HighQuality;
oGraphic.SmoothingMode =

SmoothingMode.HighQuality;
oGraphic.InterpolationMode =

InterpolationMode.HighQualityBicubic;
oGraphic.PixelOffsetMode =

PixelOffsetMode.HighQuality;

Rectangle oRectange = new Rectangle (0, 0, imgNewWidth, imgNewHeight);
oGraphic.DrawImage(image1, oRectange);

smallimage.Save(Server.MapPath(imgfilepath + newFilename), System.Drawing.Imaging.

ImageFormat.Jpeg);
:::::::::::::::::::::::::::::::::::::::::::::::::: ::::::
Thanks in advance,
Rick
Apr 10 '07 #1
1 1920
sicarie
4,677 Recognized Expert Moderator Specialist
Rick-

I'm sorry if I missed it in there, but was there a question in that post?
Apr 10 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2855
by: Gary \(Girish\) | last post by:
Hello: I am using SA-FileUp to enable members to upload their product images to my ISP sever. When member uploaded a new image file, the file name is replaced with the member ID and the old file...
2
6762
by: Tyrone Slothrop | last post by:
I am coding a site which involves uploading images. All of the PHP and display is OK but the client wants to be able to display the image thumbnail on the upload page and show the full image on...
11
3227
by: bissatch | last post by:
Hi, I am trying to upload an image, create a new file based on that image and then store the base64 encoded image data in a database. I dont really know where my code is going wrong so I will...
2
4151
by: Faree | last post by:
Hi, I am a PHP Developer.can any one help me on image upload and display of that image.what i want is uploading an image to a directory ,displaying of that image as a thumbnail.when i...
0
2266
by: Satish Appasani | last post by:
Hi: I have a ASP.NET form with Web layout which I've achieved using panels. In one of the tab I have a File control to upload Images. When I put a file in the file control and move to another...
2
2351
by: Poppa Pimp | last post by:
ImageResizer.php Image Resizer PLEASE HELP The URL of the page this is on in my site is http://poppa-pimps-wallpapers.com//ImageResizer.php You can click on browse and get image,but...
2
2003
by: RickVidallon | last post by:
I have a .Net application written in C# where members may upload their photos and have them displayed on our website. We are trying to maintain the best quality using best settings in .Net for...
7
2351
by: xx75vulcan | last post by:
Hi, I've got a PHP Upload Form that works great, unless that is, the image your uploading has been modified through a photo editing software. Example: if I upload the image straight from a...
1
2970
by: amritranjan | last post by:
How to retrive image file from MS access database and display this in another JSPpage -------------------------------------------------------------------------------- This is my Jsp code for...
0
7254
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7094
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7519
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5677
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.